I need to have a cell that is initially empty, but that has a cellvaluetype of int.
I find that if I set the cellvaluetype to int, but do not set the cellvalue to an integer, then I get the following exception:
System.Exception: is not a valid value for Int32. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.String.get_Chars(Int32 index)
at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
I could ignore the cellvaluetype, ie leave it as text, but then I lose the built-in valuetype checking.
Going further, I could also do my own validation, but that seems like I''m working against the grid rather than with it.
Am I missing something obvious? This seems like a fairly common need: cells that have a an assigned type but that are blank until data is entered.
ADAdministrator Syncfusion Team January 6, 2004 01:49 AM
What version of our grid are you using?
Unless I am missing something, I do not see a problem in 126.96.36.199 trying to have CellValueType = typeof(int) and CellValue = null in this sample that has both a GridControl and a GridDataBoundGrid with such cells.