DataControlBase.SelectionMode Property
Gets or sets whether multiple row/cell selection is enabled. This is a dependency property.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v18.2.Core.dll
Declaration
Property Value
Type | Description |
---|---|
MultiSelectMode | A MultiSelectMode enumeration value that specifies the selection mode. |
Available values:
Name | Description |
---|---|
None | Multi-selection is disabled. |
Row | Allows selection of multiple rows. |
Cell | Allows selection of multiple cells. |
MultipleRow | Allows toggling the selection of multiple rows. |
Remarks
Multiple row/cell selection isn’t allowed if the DataViewBase.NavigationStyle property is set to GridViewNavigationStyle.None and/or the SelectionMode property is set to MultiSelectMode.None. To enable multiple row selection, set the SelectionMode property to MultiSelectMode.Row. To enable touch-friendly multiple row selection, set the SelectionMode property to MultiSelectMode.MultipleRow. Multiple cell selection (block selection) is enabled by setting the SelectionMode property to MultiSelectMode.Cell.
To enable single row selection, set the DataViewBase.NavigationStyle property to GridViewNavigationStyle.Row and/or the SelectionMode property to MultiSelectMode.None.
For the CardView, setting the SelectionMode property affects card selection (similar to row selection in the TableView). Setting the SelectionMode property to MultiSelectMode.None, or MultiSelectMode.Cell disables card selection.
To learn more, see Multiple Row Selection and Multiple Cell Selection.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the SelectionMode property.
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.