Skip to main content
A newer version of this page is available. .

Multiple Row Selection via Built-In Check Column

  • 3 minutes to read

The GridView supports multiple row selection via a built-in Check column. When enabled, the Check column is the first column in the grid. This column provides a check box in each row. An end-user can toggle the check box to change the row’s selection state. Similar to the regular multiple row selection mode, rows can be selected using mouse and keyboard shortcuts (see End-user Capabilities.Selecting Rows).

The following image illustrates a GridView with the Check column feature enabled.

Selection_MultipleRowSelection_CheckBox

Note

The BandedGridView and AdvBandedGridView do not support row selection via a built-in Check column.

Note

A click on a check column’s cell with the ALT, CTRL or SHIFT key pressed down does not toggle the check box in this cell.

To enable row selection via the Check column, set the properties as follows.

A click on a data cell outside the Check column does not clear the current selection. To clear selection in this scenario, set the GridOptionsSelection.ResetSelectionClickOutsideCheckboxSelector property to true. If the GridOptionsSelection.ResetSelectionClickOutsideCheckboxSelector option is set to false (the default value) and two or more rows have been selected, a click on a data cell does not activate the cell’s editor. In this case, the cell editor can only be activated using the keyboard (for instance, by pressing the F2 key for text editors and by pressing the F4 key for dropdown editors). See Edit Grid Cells for more information.

By default, the Check column contains a check box within its header. This check box, when toggled, selects or deselects all grid rows. You can hide it with the GridOptionsSelection.ShowCheckBoxSelectorInColumnHeader property. If the header check box is hidden, the “Selection” text caption is displayed instead. This text can be changed using the localization mechanism. See the following online article for more information: How to change the built-in Check column caption.

Group rows can also contain check boxes (set the GridOptionsSelection.ShowCheckBoxSelectorInGroupRow property to True). These check boxes switch the selection states of rows that belong to specific groups.

Selection_MultipleRowSelection_CheckBox_GroupRows

The Check column visibility in the print/export output is specified by the GridOptionsSelection.ShowCheckBoxSelectorInPrintExport property. The following image shows a print preview for a grid control whose ShowCheckBoxSelectorInPrintExport property is set to True.

Selection_MultipleRowSelection_CheckBox_PrintPreview

Methods to Work with Selected Rows

See the Multiple Row and Cell Selection topic to learn about the methods used to select rows in code, retrieve and delete selected rows, and copy them to the Clipboard.

See Also