TableView.SelectCells(Int32, GridColumn, Int32, GridColumn) Method
Selects multiple cells.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v24.2.dll
NuGet Package: DevExpress.Wpf.Grid.Core
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 containing the cell that identifies the starting point of the selection. |
startColumn | GridColumn | A GridColumn object that represents the column containing the cell that identifies the starting point of the selection. |
endRowHandle | Int32 | An integer value that specifies the handle of the row containing the cell that identifies the end point of the selection. |
endColumn | GridColumn | A GridColumn object that represents the column containing the cell that identifies the ending point of the selection. |
Remarks
The SelectCells method allows you to select multiple cells, adding them to the existing selection (if any). In this case, the method’s parameters determine the block’s starting and ending edges, respectively.
The SelectCells method does nothing if the DataViewBase.NavigationStyle property isn’t set to GridViewNavigationStyle.Cell and/or the TableView.MultiSelectMode property isn’t set to TableViewSelectMode.Cell.
To select a single cell, use the TableView.SelectCell method.
To learn more on multi-cell selection, see Multiple Cell Selection.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SelectCells(Int32, GridColumn, Int32, GridColumn) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.