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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

15686 Jun 24,2004 03:58 PM UTC Jun 24,2004 05:16 PM UTC Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On June 24, 2004 03:58 PM UTC

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

Administrator [Syncfusion]
Replied On 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).

Administrator [Syncfusion]
Replied On 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).

Administrator [Syncfusion]
Replied On 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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;