I Have a Added a Column to the grid that has CellType property set to CheckBox.
At runtime the CheckBox showsup in the Grid but when I click it the state of the checkbox dose not change i.e. the checkmark dose not appear, in fact nothing happens. Can anybody help me...
My code --
Dim oSelectColumn As New Syncfusion.Windows.Forms.Grid.GridBoundColumn
oSelectColumn.HeaderText = "Select"
oSelectColumn.StyleInfo.HorizontalAlignment = Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Center
oSelectColumn.StyleInfo.CellType = "CheckBox"
oSelectColumn.StyleInfo.CheckBoxOptions = New GridCheckBoxCellInfo("True", "False", "", False)
oSelectColumn.StyleInfo.CellValue = False
oSelectColumn.StyleInfo.TriState = False
ADAdministrator Syncfusion Team February 25, 2004 12:56 PM UTC
You did not set oSelectColumn.MappingName. Without this being set, the grid does not know where in your datasource to get/set the values for this column.
ADAdministrator Syncfusion Team February 26, 2004 07:26 AM UTC
Hey Clay, Thanks for the Reply....I tried assigning the MappingName property but the problem dose not get solved. Actually the CheckBox at runtime dose not respond to the Click by changing its state. i.e. If the CheckBox is checked I mean if there is a check mark then after clicking over it there should a change in status...should get unchecked and vise-versa which is not happening.
>You did not set oSelectColumn.MappingName. Without this being set, the grid does not know where in your datasource to get/set the values for this column.
ADAdministrator Syncfusion Team February 26, 2004 09:01 AM UTC
Adding the mapping name makes your code work for me in this sample.
One other thing to check is exactly what is stored in your database in this column. If it is not a boolean, but instead something like a Y or N, or 1 or 0, then you should change the GridCheckBoxCellInfo to reflect the actual values your datasource has. (To see these actual values, run the project commenting out the line that sets the CellType so the value just shows in the cells).