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
close icon

Currency Format

Hi,

At the time of initialization, we are setting the column type like below,
--------------------------------------------------------------------
// Set the column types
GridStyleInfo colStyleInfo = ColStyles[colIndex];

if (colType.Equals(typeof(double).ToString()))
{
colStyleInfo.HorizontalAlignment = GridHorizontalAlignment.Right;
colStyleInfo.CellValueType = typeof(double);
colStyleInfo.Format = "#,##0.00";
}
--------------------------------------------------------------------

This allow us not to type negative(-), when we start editing. But after typing a number, it allow us to type negative(-).

Request To Know:
----------------
1. We should have the ability to start with negative(-).
2. Could you please give us a small description about the purpose of "#" in the format.

Please help us out.

Thanks & Regards,
Sathish.

1 Reply

AJ Ajish Syncfusion Team August 30, 2007 01:23 AM UTC

Hi Sathish,

Here are the details for your questions.

1. We should have the ability to start with negative(-)

Please refer the following sample for allowing both positive and negative number with the mentioned number format
Sample: http://websamples.syncfusion.com/samples/Grid.Windows/F67763/main.htm

2. Could you please give us a small description about the purpose of "#" in the format.

Please refer to the following link for the details of # formatting
http://idunno.org/archive/2004/14/01/122.aspx

Kindly take a look and let me know if you have any questions.

Regards,
Ajish


Loader.
Live Chat Icon For mobile
Up arrow icon