Edit this page

Multiple Selection

RadGridView allows the user to select more than one item at a time from the displayed data. By default, this functionality is disabled and in order to turn it on, you have to set the MultiSelect property to true.

Multiple row selection

In order to enable multiple row selection, after setting the MultiSelect property to true, you have to set the SelectionMode to GridViewSelectionMode.FullRowSelect:

radGridView1.MultiSelect = true;
radGridView1.SelectionMode = GridViewSelectionMode.FullRowSelect;

RadGridView1.MultiSelect = True
RadGridView1.SelectionMode = GridViewSelectionMode.FullRowSelect

When these settings are applied, you have several options to make a multiple selection:

  • Press Ctrl + A to select all rows in RadGridView.

  • Hold the Ctrl key and click the rows that you want to select.

  • In order to mark a block selection, mark the first row of the desired selection, hold Shift and click on the last row of the desired selection.
    gridview-selection-multiple-selection 001

All the selected rows are available in the RadGridView.SelectedRows collection

Multiple cell selection

In order to enable multiple cell selection, after setting the MultiSelect property to true, you have to set the SelectionMode to GridViewSelectionMode.CellSelect:

radGridView1.MultiSelect = true;
radGridView1.SelectionMode = GridViewSelectionMode.CellSelect;

RadGridView1.MultiSelect = True
RadGridView1.SelectionMode = GridViewSelectionMode.CellSelect

Once you have applied these setting, the options for selection are:

  • Press Ctrl + A to select all cells in RadGridView.

  • Holding the Ctrl key and click the cells that you want to select.

  • In order to mark a block selection, mark the first cell of the desired selection, hold Shift and click on the last cell of the desired selection. Please note that this will select all the cells in the rectangle between the first and the second selected cell.

gridview-selection-multiple-selection 002

All the selected cells are available in the RadGridView.SelectedCells collection

If the MultiSelect property is enabled, you can make a multiple selection by holding the left mouse button down and moving the mouse making a rectangle. This will select all rows (cells) in the created rectangle.
gridview-selection-multiple-selection 003

CurrentRow and CurrentCell when multiple selection is used

When multiple row (cell) selection is used, the current row(cell) value will be equal to the last cell (row) clicked when a selection is made.

See Also