Class TreeGridRowSelectionController
Represents a class TreeGridRowSelectionController which handles row selection operations in SfTreeGrid.
Implements
Inherited Members
Namespace: Syncfusion.Maui.TreeGrid
Assembly: Syncfusion.Maui.TreeGrid.dll
Syntax
public class TreeGridRowSelectionController : TreeGridSelectionController, IDisposable
Constructors
TreeGridRowSelectionController(SfTreeGrid?)
Initializes a new instance of the TreeGridRowSelectionController class.
Declaration
public TreeGridRowSelectionController(SfTreeGrid? treeGrid)
Parameters
| Type | Name | Description |
|---|---|---|
| SfTreeGrid | treeGrid | The reference of the SfTreeGrid. |
Methods
ApplySelection(int)
Applies selection to the specified row index based on the current selection mode.
Declaration
protected override bool ApplySelection(int rowIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | rowIndex | The row index in which the selection is applied. |
Returns
| Type | Description |
|---|---|
| bool | True if the selection is applied; otherwise, false. |
Overrides
HandleSelectionPropertyChanges(TreeGridSelectionPropertyChangedEventArgs)
Handles changes in the selection-related properties.
Declaration
public virtual void HandleSelectionPropertyChanges(TreeGridSelectionPropertyChangedEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| TreeGridSelectionPropertyChangedEventArgs | args | The selection property changed arguments. |
ProcessDownKey(int)
Processes the Down arrow key with support for Shift+Down range selection in Extended mode.
Declaration
protected override void ProcessDownKey(int rowIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | rowIndex | The row index to navigate to. |
Overrides
ProcessSelectedItemsChanged(NotifyCollectionChangedEventArgs)
Processes changes made directly to the SelectedRows collection.
Declaration
public virtual void ProcessSelectedItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| NotifyCollectionChangedEventArgs | e | The collection changed event arguments. |
ProcessSpaceKey()
Processes the Space key for toggling row selection.
Declaration
protected override void ProcessSpaceKey()
Overrides
ProcessUpKey(int)
Processes the Up arrow key with support for Shift+Up range selection in Extended mode.
Declaration
protected override void ProcessUpKey(int rowIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| int | rowIndex | The row index to navigate to. |
Overrides
RefreshSelection()
Refreshes the selection state and updates SelectedIndex, SelectedRow and SelectedRows properties.
Declaration
public void RefreshSelection()
SelectAll()
Selects all rows in multiple-selection mode.
Declaration
public override bool SelectAll()
Returns
| Type | Description |
|---|---|
| bool | True if the rows are selected; otherwise, false. |
Overrides
SelectRowRange(int, bool)
Selects a range of rows between the anchor (PressedRowColumnIndex) and the specified row index for Shift and Ctrl+Shift interactions in Extended mode.
Declaration
protected override bool SelectRowRange(int endIndex, bool preserveExistingSelection)
Parameters
| Type | Name | Description |
|---|---|---|
| int | endIndex | The row index to extend the selection to. |
| bool | preserveExistingSelection | Indicates whether to keep previous selections outside the range. |
Returns
| Type | Description |
|---|---|
| bool | True if the range selection is applied; otherwise, false. |