We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

CheckBox Question

It''s not clear to me what the CheckBoxOptions.CheckedValue is supposed to do. Is that supposed to make the box be checked if it has a value? It would be much easier if there was a checked property (boolean) you could set on the cell.

1 Reply

AD Administrator Syncfusion Team February 24, 2004 01:49 PM

Hi Josh, The purpose of CheckBoxOptions.CheckedValue is to specify what value should be given in the Cell Value to make the check box 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; Some users want it to be 1 and 0 to be checked and unchecked values because their database might be providing either 1 or 0. So you can specify either way by setting the CheckedValue and UncheckedValue properties. Let us know if you need more information. Regards, Jay N

Live Chat Icon For mobile
Up arrow icon