Skip to main content
A newer version of this page is available. .

TableView.GetSelectedCells() Method

Gets selected data cells.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v18.2.dll

Declaration

public IList<GridCell> GetSelectedCells()

Returns

Type Description
IList<GridCell>

A list of the GridCell objects.

Remarks

Call the nested GridControl’s TableView.GetSelectedCells method to get detail grids’ selected cells.

If multiple cell selection is disabled or there aren’t any selected cells, the GetSelectedCells method returns an empty list. To enable block selection, set the DataViewBase.NavigationStyle property to GridViewNavigationStyle.Cell and set the DataControlBase.SelectionMode property to MultiSelectMode.Cell.

To obtain handles of selected rows, use the DataControlBase.GetSelectedRowHandles method.

To learn more about multi-cell selection, see Multiple Cell Selection.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetSelectedCells() 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.

See Also