2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
In order to pre-select the checkbox in a grid cell, CellValue can be used to set value for the CheckBox. It is depending upon the values of CheckBoxOptions.CheckedValue and CheckBoxOptions.UncheckedValue. Because these properties hold the values for selecting the checkbox. Code Snippet C# //Sets the cell type as Checkbox. this.gridControl1[row, col].CellType = "CheckBox"; //Sets the Checked and Unchecked values for the checkbox. this.gridControl1[row, col].CheckBoxOptions.CheckedValue = "true"; this.gridControl1[row, col].CheckBoxOptions.UncheckedValue = "false"; //Sets the type of the cell value as bool. this.gridControl1[row, col].CellValueType = typeof(bool); //Sets the Cell value. this.gridControl1[row, col].CellValue = true;
VB 'Sets the cell type as Checkbox. Me.gridControl1(row, col).CellType = "CheckBox" 'Sets the Checked and Unchecked values for the checkbox. Me.gridControl1(row, col).CheckBoxOptions.CheckedValue = "true" Me.gridControl1(row, col).CheckBoxOptions.UncheckedValue = "false" 'Sets the type of the cell value as bool. Me.gridControl1(row, col).CellValueType = GetType(Boolean) 'Sets the Cell value. Me.gridControl1(row, col).CellValue = True
Screenshot
Sample Link:
|
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.