Skip to main content

TableView.GetSelectedCells() Method

Returns the selected data cells.

Namespace: DevExpress.Xpf.Grid

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

#Declaration

public IList<GridCell> GetSelectedCells()

#Returns

Type Description
IList<GridCell>

The list of GridCell objects that contain cell coordinates (row and column).

#Remarks

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 TableView.MultiSelectMode property to TableViewSelectMode.Cell.

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

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

See Also