CheckBox Column

GridViewCheckBoxColumn derives from GridViewBoundColumnBase class and its content is represented by a CheckBox for each row. The difference between it and GridViewSelectColumn is that this one is meant to be bound. As opposed, GridViewSelectColumn allows you to select the row through the CheckBox that it utilizes.

Example 1: Declare a column of type GridViewCheckBoxColumn.

<telerik:RadGridView x:Name="radGridView" 
        <telerik:GridViewCheckBoxColumn DataMemberBinding="{Binding IsActive}" /> 

Use this column for better performance when you know that the underlying data is of boolean type.

GridViewCheckBoxColumn provides a property that is not present in any other column: AutoSelectOnEdit. When set to True the CheckBox is automatically toggled on editing the cell thus decreasing the number of clicks you need to take to change the boolean value of the bound property.

Here are the possible cases:

  1. Default (AutoSelectOnEdit="False", EditTriggers="Default") - three clicks are needed to change the value of the CheckBox - two clicks to enter the edit mode and one click to toggle the CheckBox state.

  2. AutoSelectOnEdit="True", EditTriggers="Default" - two clicks are needed to change the value of the CheckBox - the clicks to enter the edit mode.

  3. AutoSelectOnEdit="True", EditTriggers="CellClick" - only one click is needed to change the value of the CheckBox.

Since the GridViewCheckBoxColumn is specially designed to dispay checkboxes, setting its CellTemplate, CellEditTemplate, CellTemplateSelector and CellEditTemplateSelector is not supported. For such requirements, you can use a GridViewDataColumn.

See Also

In this article
Not finding the help you need? Improve this article