Back to Devexpress

TableView.GetSelectedCells() Method

wpf-devexpress-dot-xpf-dot-grid-dot-tableview-1fb9a0fe.md

latest2.7 KB
Original Source

TableView.GetSelectedCells() Method

Gets selected data cells.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public IList<GridCell> GetSelectedCells()
vb
Public Function GetSelectedCells As IList(Of GridCell)

Returns

TypeDescription
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.

See Also

SelectCell(Int32, GridColumn)

SelectCells(Int32, GridColumn, Int32, GridColumn)

UnselectCell(Int32, GridColumn)

UnselectCells(Int32, GridColumn, Int32, GridColumn)

TableView Class

TableView Members

DevExpress.Xpf.Grid Namespace