GridView.SelectCells(Int32, GridColumn, Int32, GridColumn) Method
Selects multiple cells.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v24.2.dll
Declaration
public void SelectCells(
int startRowHandle,
GridColumn startColumn,
int endRowHandle,
GridColumn endColumn
)
Parameters
Name | Type | Description |
---|---|---|
startRowHandle | Int32 | An integer value that specifies the handle of the row in which the cell that identifies the starting point of the selection is located. |
startColumn | GridColumn | A GridColumn object that represents the column in which the cell that identifies the starting point of the selection is located. |
endRowHandle | Int32 | An integer value that specifies the handle of the row in which the cell that identifies the end point of the selection is located. |
endColumn | GridColumn | A GridColumn object that represents the column in which the cell that identifies the end point of the selection is located. |
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 method’s parameters determine the block’s starting and ending edges. To ensure that block selection is enabled use the GridView.IsCellSelect property.
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 startRowHandle and endRowHandle parameters specify the first and last rows, respectively.