New to Telerik UI for WPF? Download free 30-day trial

Selection via CheckBox

The RadGridView's API offers you a GridViewSelectColumn, with the help of which you can perform a selection via CheckBox. The purpose of this tutorial is to show you how to achieve this behavior.

Here is a RadGridView declaration, which is populated with some sample data.

<telerik:RadGridView x:Name="radGridView" 
        <telerik:GridViewSelectColumn /> 
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Id}" 
        <telerik:GridViewDataColumn DataMemberBinding="{Binding OrderNO, Mode=TwoWay}" 
                                Header="Order No"> 
        <telerik:GridViewDataColumn DataMemberBinding="{Binding OrderDate, Mode=TwoWay}" 
                                Header="Order Date"> 
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Country, Mode=TwoWay}" 
        <telerik:GridViewDataColumn DataMemberBinding="{Binding Shipped, Mode=TwoWay}" 
The grid is shown on the next figure.

Telerik WPF DataGrid HowTo SelectionViaCheckbox 010

In order to enable the selection via checkbox behavior, you need to perform the following instructions:

  1. Enable multiple selection for the RadGridView.

<telerik:RadGridView SelectionMode="Extended"> 
2. Add an additional GridViewColumn of type GridViewSelectColumn.

Here is the final result. When you select the CheckBox Header, then all rows will be automatically selected.

Telerik WPF DataGrid HowTo SelectionViaCheckbox 020

When you want to use selection via checkbox, then:1. Set the SelectionMode property to Extended or Multiple. Leaving it to Single you won't be able to select all of the entries in the RadGridView.2. Add a GridViewSelectColumn.

If you need further information for the GridViewSelectColumn and all other provided columns take a look at the this topic.

In this article