To put a CheckBox in the GridControl, set the CellType to CheckBox and assign string values for the CheckedValue and UncheckedValue in the CheckBoxOptions property. The value of the CheckBox can be stored to a particular cell in the GridControl and the CheckBoxClick event gets triggered when the CheckBox is clicked.
The following is the code example for GridControl.
To put a CheckBox in the GridDataBoundGrid, two events have to be used. The QueryCellInfo event is used to set the style properties and the SaveCellInfo event is used to save the cell's value. The value of the CheckBox cannot be stored in the GridDataBoundGrid, so any datatype/collection can be used to store the value. The CheckBoxClick event gets triggered when the CheckBox is clicked.
In the following code example, the CheckBox is added to the Column header on the GridDataBoundGrid.
In the following screenshot, the CheckBox is added to the Column header on the GridControl and GridDataBoundGrid.
Figure 1: CheckBox in the Header for GridControl and GridDataBoundGrid
|Article ID:||Published Date:||Last Revised Date:||Platform:||Control:|
or the page will be automatically redirected to sign-in page in 10 seconds.