We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Any way to have 4 right hand decimal places for a price field?

I have a price field in my grid, but I''d like 4 instead of 2 decimal places. Any easy way to achieve this?

3 Replies

AD Administrator Syncfusion Team June 24, 2004 04:08 PM UTC

If the style.CellValueType for the cell is set to double or single or decimal, then you can set style.Format = "F4" (or "#.0000" or any other format string - see grid\samples\quickstart\TextFormat for other examples).


AD Administrator Syncfusion Team June 24, 2004 05:03 PM UTC

That works *but* I can no longer enter the field and modify the value. It seems as if its now read only after changing it from Currency to Decimal or Double. >If the style.CellValueType for the cell is set to double or single or decimal, then you can set style.Format = "F4" (or "#.0000" or any other format string - see grid\samples\quickstart\TextFormat for other examples).


AD Administrator Syncfusion Team June 24, 2004 05:16 PM UTC

There is no problem changing the values in the grid\samples\quickstart\TextFormat sample. Can you post a little sample showing the problem? If the type coming from teh database is Currency, you probably do not have to change the style.CellValueType, just set the style.Format. The formatting normally works OK as long as the type is not string.

Loader.
Up arrow icon