DataColumn Question

  • Thread starter Thread starter Roshawn
  • Start date Start date
R

Roshawn

Hi,

I have a DataColumn that is specified as a decimal. How do you format the
column so that the data has only two digits to the right of the decimal
point (rounded to the nearest hundredth)?

Thanks,
Roshawn
 
Rowshawn:

If you are talking about in a grid, you need to add a datagridtablesytle and
a datagridcolumstyle. You can specify the formatter there. if you are
using a textbox, you can add an eventhandler for the .Parse and .Format
events and specify it in the Format event.. I think the format specifier
your looking for is #,###,###.00

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
 
Back
Top