AD
Administrator
Syncfusion Team
May 17, 2006 04:00 AM UTC
Hi Ravichandran ,
You need to set the cell''s CheckBoxOptions property of the Grid. CheckBoxOptions.CheckedValue is used to specify what value should be given in the CellValue to make the checkbox checked (ie., either "1" or "true"). Say for example if you want "true" to be checked and "false" to be unchecked state. Here is the code snippet.
this.gridControl1[1,1].CellType = "CheckBox";
this.gridControl1[1,1].CheckBoxOptions.CheckedValue = "true";
this.gridControl1[1,1].CheckBoxOptions.UncheckedValue = "false";
this.gridControl1[1,1].CellValueType = typeof(bool);
this.gridControl1[1,1].CellValue = true;
You can also set "1" and "0" to be checked and unchecked values in the similar way.
Best Regards,
Haneef