Class DataGridRowSelectionController
Represents a class DataGridRowSelectionController which handles the row selection operations in SfDataGrid.
Implements
Inherited Members
Namespace: Syncfusion.Maui.DataGrid
Assembly: Syncfusion.Maui.DataGrid.dll
Syntax
public class DataGridRowSelectionController : DataGridSelectionController, IDisposable
Constructors
DataGridRowSelectionController(SfDataGrid)
Initializes a new instance of the
Declaration
public DataGridRowSelectionController(SfDataGrid dataGrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The reference of the SfDataGrid. |
Properties
LastSelectedRowIndex
Gets or sets the last selected row index.
Declaration
protected int LastSelectedRowIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The row index of the last selected row. |
Methods
ApplySelection(RowColumnIndex, Boolean)
Applies selection.
Declaration
protected override void ApplySelection(RowColumnIndex rowColumnIndex, bool isfromNavigationKeys = false)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | Gets the RowColumnIndex. |
System.Boolean | isfromNavigationKeys | Gets the boolen value for process the navigation key. |
Overrides
Dispose(Boolean)
Releases the unmanaged resources used by the component and optionally releases the managed resources.
Declaration
protected override void Dispose(bool isDisposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isDisposing | if true - release both managed and unmanaged resources; if false - release only unmanaged resources. |
Overrides
Remarks
Application developers can override this to get notified of dispose call and dispose the required objects here.
HandleCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)
Handles the collection changes such as selected items and source collection changed to process selection.
Declaration
public virtual void HandleCollectionChanged(NotifyCollectionChangedEventArgs e, CollectionChangedReason reason)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | The System.Collections.Specialized.NotifyCollectionChangedEventArgs. |
Syncfusion.Maui.DataGrid.CollectionChangedReason | reason | The reason for the collection change. |
HandleGridOperation(GridOperationHandlerArgs)
Handles the grid operations.
Declaration
public virtual void HandleGridOperation(GridOperationHandlerArgs e)
Parameters
Type | Name | Description |
---|---|---|
GridOperationHandlerArgs | e |
HandlePointerOperation(RowColumnIndex)
Handles the pointer operation (touch-up or double tap) to handle selection.
Declaration
public virtual void HandlePointerOperation(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | The row column index in which the pointer operation is performed. |
HandleSelectionPropertyChanges(DataGridSelectionPropertyChangedEventArgs)
Handles the selection when the selection related properties gets changed.
Declaration
public virtual void HandleSelectionPropertyChanges(DataGridSelectionPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DataGridSelectionPropertyChangedEventArgs | args |
ProcessCurrentItemChanged(DataGridSelectionPropertyChangedEventArgs)
Processes the
Declaration
protected override void ProcessCurrentItemChanged(DataGridSelectionPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DataGridSelectionPropertyChangedEventArgs | args | SelectionPropertyChangedHandler arguments. |
Overrides
Remarks
When
ProcessingPointerTouchUp(RowColumnIndex)
Method to process the pointer touch up. Handles the touch up operation of each row in a SfDataGrid control.
Declaration
public virtual void ProcessingPointerTouchUp(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | The row column index in which the touch up action is performed. |
ProcessNavigationModeChanged(DataGridSelectionPropertyChangedEventArgs)
Processes the
Declaration
protected virtual void ProcessNavigationModeChanged(DataGridSelectionPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DataGridSelectionPropertyChangedEventArgs | args |
Remarks
When navigation mode is changed from cell to row clears all selection.
ProcessOnGroupChanged(DataGridGroupDescriptionChangedEventArgs)
Processes selection when the grouping is changed in a control.
Declaration
protected override void ProcessOnGroupChanged(DataGridGroupDescriptionChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DataGridGroupDescriptionChangedEventArgs | args |
Overrides
ProcessOnSortChanged(DataGridSortDescriptionChangedEventArgs)
Processes selection when the sorting is changed in a
Declaration
protected override void ProcessOnSortChanged(DataGridSortDescriptionChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DataGridSortDescriptionChangedEventArgs | args |
Overrides
ProcessSelectedIndexChanged(DataGridSelectionPropertyChangedEventArgs)
Processes the
Declaration
protected override void ProcessSelectedIndexChanged(DataGridSelectionPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DataGridSelectionPropertyChangedEventArgs | args |
Overrides
Remarks
When
ProcessSelectedItemChanged(DataGridSelectionPropertyChangedEventArgs)
Processes the
Declaration
protected override void ProcessSelectedItemChanged(DataGridSelectionPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DataGridSelectionPropertyChangedEventArgs | args |
Overrides
ProcessSelectedItemsChanged(NotifyCollectionChangedEventArgs)
Processes the
Declaration
public virtual void ProcessSelectedItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | The System.Collections.Specialized.NotifyCollectionChangedEventArgs. |
ProcessSelectionModeChanged(DataGridSelectionPropertyChangedEventArgs)
Processes the
Declaration
protected override void ProcessSelectionModeChanged(DataGridSelectionPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DataGridSelectionPropertyChangedEventArgs | args |
Overrides
Remarks
When selection mode is changed from multiple to single/singleDeselect clears all the selection expect last selection.
ProcessSourceCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)
Processes the source collection changes to update selection in a
Declaration
protected override void ProcessSourceCollectionChanged(NotifyCollectionChangedEventArgs e, CollectionChangedReason reason)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | NotifyCollectionChangedEvent arguments. |
Syncfusion.Maui.DataGrid.CollectionChangedReason | reason | CollectionChanged reason. |
Overrides
RefreshSelection()
Refreshes the selections and sets values for the SelectedIndex,
Declaration
public void RefreshSelection()
ResetSelection()
Resets the selected index for the rows in
Declaration
public void ResetSelection()
SelectAll()
Selects all the cells in SfDataGrid.
Declaration
protected override void SelectAll()
Overrides
SetSelectionAnimation(DataGridRow)
Sets animation for the selected row.
Declaration
protected virtual void SetSelectionAnimation(DataGridRow rowElement)
Parameters
Type | Name | Description |
---|---|---|
DataGridRow | rowElement | The view which holds the row data of the selected row. |