Skip to main content

GridView.SelectCells(GridCell, GridCell) Method

Selects multiple cells.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v24.2.dll

Declaration

public void SelectCells(
    GridCell start,
    GridCell end
)

Parameters

Name Type Description
start GridCell

A GridCell object representing the grid cell which identifies the starting point of the selection.

end GridCell

A GridCell object representing the grid cell which identifies the end point of the selection.

Remarks

If multiple selection is disabled, the SelectCells method does nothing. To allow multiple row (cell) selection set the ColumnViewOptionsSelection.MultiSelect option to true.

The SelectCells method allows multiple cells to be selected if block selection is enabled. In this case the start and end parameters determine the block’s starting and ending edges, respectively. To ensure that block selection is enabled use the GridView.IsCellSelect property.

SelectCellAnchorRange

If block selection is disabled (the GridOptionsSelection.MultiSelectMode property is set to the GridMultiSelectMode.CellSelect value), the SelectCells method selects the specified range of rows. The start and end parameters specify the first and last rows, respectively.

See Also