How to specify a cell to be a percentage field?

I have defined a cell to have the following GridStyleInfo: info.Format = "0.0%"; info.CellValueType = typeof(double); The idea is to display percentages. This works apart from when the user wishes to update an existing value with a different one. The following example demonstrates the problem: 1. User originally typed ''2.2'' into the cell. 2. Cell displays ''2.2%'' 3. User double-clicks into the cell to edit the number. the text he is editing is ''2.2%'' 4. User changes the first 2 to a 3 and presses enter. ie the cell contains ''3.2%'' 5. Grid throws an exception stating ''3.2% is not a valid value for a Double'' Clearly the % character is causing the problem. Suggestions?

1 Reply

AD Administrator Syncfusion Team October 7, 2004 05:17 PM UTC

Here are a couple of forum threads that show different ways to tackle this problem. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=17345 http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=16888

Loader.
Up arrow icon