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

J. J.Nagarajan Syncfusion Team August 31, 2007 12:59 AM UTC

Hi Sathish,

Thanks for your continued interest in Syncfusion product.

1. Yes, You can able to type negative value at the starting position.
I have attached the sample that demonstrates this completely. It is for allowing both positive and negative number with the mentioned number format
http://websamples.syncfusion.com/samples/Grid.Windows/F67762/main.htm

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

Please let me know if you have any questions.

Regards,
Nagaraj

Loader.
Up arrow icon