Changing CellValueType

I am trying to change the cellvaluetype for an unbound grid from the apparent default of string to double. I have tried to do this as follow: Dim GridstyleDouble As New GridStyleInfo GridstyleDouble.CellValueType = Type.GetType("Double") GridControl1.ChangeCells(GridRangeInfo.Cells(1, 1, 365, 1), GridstyleDouble) However, it does not work. Is there some way to easily set the cells valuetype of an unbound grid cell using VB.NET? I have also tried to set each cell individually using ... GridControl1.Item(i, j).CellValueType = type.GetType(Double) But, it does not recognize the notation "Double". The only thing that appears to work is to manually convert the value to double using System.Convert.ToDouble(GridControl1.Item(i - 1, j).CellValue) This is the only way that I can work with the values in a grid. Any thoughts to help a newbie?

1 Reply

AD Administrator Syncfusion Team October 2, 2005 11:29 PM UTC

Here is a little sample. It uses the VB operator GetType which accepts a name instead of the object required by Type.GetType. http://www.syncfusion.com/Support/user/uploads/GC_Double_e50a08de.zip

Loader.
Up arrow icon