GridView.SelectCellAnchorRange(Int32, GridColumn, Int32, GridColumn) Method

Selects multiple cells.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

public virtual void SelectCellAnchorRange(
    int startRowHandle,
    GridColumn startColumn,
    int endRowHandle,
    GridColumn endColumn
)
Public Overridable Sub SelectCellAnchorRange(
    startRowHandle As Integer,
    startColumn As GridColumn,
    endRowHandle As Integer,
    endColumn As GridColumn
)

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 objects 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 SelectCellAnchorRange method does nothing. To allow multiple row (cell) selection set the ColumnViewOptionsSelection.MultiSelect option to true.

The SelectCellAnchorRange 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.

SelectCellAnchorRange

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

See Also