The example shows the client selection built-in feature of Telerik RadGrid. Single
row can be selected by clicking the row itself (note that you need to set AllowRowSelect="true"
to enable client row selection). There is also a GridClientSelectColumn, which you
can use to select and unselect row(s) client-side. You can use it to select all
the rows using the check box at the header.
Furthermore, you can select multiple rows after setting the AllowMultiRowSelection
property of the grid to true. Several rows can be selected either by:
- holding the Ctrl key when clicking the rows
- dragging a region with the mouse to select all underlying rows. To accomplish this
task you have to set the ClientSettings -> Selecting -> EnableDragToSelectRows
property to true.
- clicking a row, holding the Shift key and clicking another row upwards/downwards
Later on, you can unselect a row by holding the Crtl
key and clicking the
row. You don't need this if you have GridClientSelectColumn added.
Additionally, the GridItem provides SelectableMode
property which could be set to:
- ServerAndClientSide (the default value).
The selected items will be available through the SelectedRows
of the respective RadGridTable.
Finally, there is also a checkbox column (called GridClientSelectColumn
displays a checkbox control for each item in the column. This allows you to select
grid rows client-side automatically when you change the status of the checkbox to
checked. Additionally, if you choose AllowMultiRowSelection = true
grid, a checkbox will be displayed in the column header to toggle the checked/selected
state of the rows simultaneously (according to the state of that checkbox in the
header). To allow selection through the client select column only, set the ClientSettings
-> Selecting -> UseClientSelectColumnOnly
property to true
(default value is false).