I have a typed dataset that gets filled from a SQL table with money datatype fields. When I bind to my text boxes I get 4 decimal places. What's the best way to show only 2 decimal places? Thanks.
qwert: Good point - it seems, on first glance, that when the data is bound (e.g., if you are doing simple binding), you can format on binding...
...however, I am not familiar with using a Format string within a textbox - something tells me that it can be done; but the only examples I can find (not at home now, so no library in front of me) is to format on binding.
Good question though. I suspect you could use JavaScript to accomplish this. It'll be interesting to see how this works out.
Hmm... I design time DataBind the textbox with a typed dataset, and I didn't notice before, but with VS 2k3 you have a drop down box that allows you to specify formatting. Thanks for the tips tho.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.