Class GridSelectionUnit
Defines the constants that specify whether the cell or row or any unit are used for selection in a SfDataGrid.
Inheritance
Namespace: Syncfusion.UI.Xaml.Grids
Assembly: Syncfusion.Grid.WinUI.dll
Syntax
public sealed class GridSelectionUnit : Enum
Remarks
The SelectionUnit property uses this enumeration to control the type of selection behavior in SfDataGrid. The selection behavior can be further customized by assigning a class derived from GridSelectionController or GridCellSelectionController to the SelectionController property.
Fields
Any
Both cells and rows are selectable in SfDataGrid.
Declaration
public const GridSelectionUnit Any
Field Value
| Type |
|---|
| GridSelectionUnit |
Remarks
When Any is set as the selection unit, the user can select either a row or a cell based on the interaction. The selection behavior can be further customized using the SelectionController property.
Cell
Only cells are selectable. Row selection is disabled.
Declaration
public const GridSelectionUnit Cell
Field Value
| Type |
|---|
| GridSelectionUnit |
Remarks
When Cell is set as the selection unit, individual cells can be selected based on the SelectionMode. The current cell navigation and editing is controlled by the GridCurrentCellManager.
Row
Only rows are selectable. Clicking a cell selects the entire row.
Declaration
public const GridSelectionUnit Row
Field Value
| Type |
|---|
| GridSelectionUnit |
Remarks
When Row is set as the selection unit, the SelectionMode property determines whether a single row or multiple rows can be selected.