menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class DataGridSelectionController - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class DataGridSelectionController

    Represents a base class that manages the selection operations in the SfDataGrid.

    Inheritance
    System.Object
    DataGridSelectionController
    DataGridCellSelectionController
    DataGridRowSelectionController
    Implements
    System.IDisposable
    Namespace: Syncfusion.Maui.DataGrid
    Assembly: Syncfusion.Maui.DataGrid.dll
    Syntax
    public abstract class DataGridSelectionController : Object, IDisposable

    Constructors

    DataGridSelectionController(SfDataGrid)

    Initializes a new instance of the DataGridSelectionController class.

    Declaration
    public DataGridSelectionController(SfDataGrid dataGrid)
    Parameters
    Type Name Description
    SfDataGrid dataGrid

    The SfDataGrid.

    Properties

    DataGrid

    Gets the reference of the SfDataGrid.

    Declaration
    public SfDataGrid DataGrid { get; }
    Property Value
    Type
    SfDataGrid

    SelectedRows

    Gets or sets the selected rows in the SfDataGrid.

    Declaration
    public DataGridSelectedRowsCollection SelectedRows { get; set; }
    Property Value
    Type
    Syncfusion.Maui.DataGrid.DataGridSelectedRowsCollection

    Methods

    ApplySelection(RowColumnIndex, Boolean)

    Applies selection to the cell/row at the specified row and column index based on the SelectionUnit.

    Declaration
    protected abstract void ApplySelection(RowColumnIndex rowColumnIndex, bool isfromNavigationKeys = false)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    Specifies the row and column position to select.

    System.Boolean isfromNavigationKeys

    Specifies the isfromNavigationKeys to select.

    ClearSelection()

    Clears the selection in a SfDataGrid control.

    Declaration
    public void ClearSelection()

    Dispose()

    Perform final clean up before it is released from memory.

    Declaration
    public virtual void Dispose()

    Dispose(Boolean)

    Releases the unmanaged resources used by the component and optionally releases the managed resources.

    Declaration
    protected abstract 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.

    ProcessCurrentItemChanged(DataGridSelectionPropertyChangedEventArgs)

    Processes selection when the changes.

    Declaration
    protected abstract void ProcessCurrentItemChanged(DataGridSelectionPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    DataGridSelectionPropertyChangedEventArgs args

    SelectionPropertyChangedHandler arguments.

    Remarks

    When SelectionMode is Microsoft.Maui.Controls.SelectionMode.Multiple the last selected item is stored in the . Application developers can override this to get notified when the chagnes.

    ProcessOnGroupChanged(DataGridGroupDescriptionChangedEventArgs)

    Processes the selection when group column descriptions is changed.

    Declaration
    protected abstract void ProcessOnGroupChanged(DataGridGroupDescriptionChangedEventArgs e)
    Parameters
    Type Name Description
    DataGridGroupDescriptionChangedEventArgs e

    ProcessOnSortChanged(DataGridSortDescriptionChangedEventArgs)

    Processes selection when is changed in .

    Declaration
    protected abstract void ProcessOnSortChanged(DataGridSortDescriptionChangedEventArgs e)
    Parameters
    Type Name Description
    DataGridSortDescriptionChangedEventArgs e
    Remarks

    Application developers can override this to get notified when the is changed in SfDataGrid.

    ProcessSelectedIndexChanged(DataGridSelectionPropertyChangedEventArgs)

    Processes selection when the SelectedIndex changes.

    Declaration
    protected abstract void ProcessSelectedIndexChanged(DataGridSelectionPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    DataGridSelectionPropertyChangedEventArgs args

    The DataGridSelectionPropertyChangedEventArgs.

    Remarks

    When is Microsoft.Maui.Controls.SelectionMode.Multiple the index of the first selected item is stored in the . Application developers can override this to get notified when the SelectedIndex chagnes.

    ProcessSelectedItemChanged(DataGridSelectionPropertyChangedEventArgs)

    Processes selection when the changes.

    Declaration
    protected abstract void ProcessSelectedItemChanged(DataGridSelectionPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    DataGridSelectionPropertyChangedEventArgs args

    The DataGridSelectionPropertyChangedEventArgs.

    Remarks

    Application developers can override this to get notified when the chagnes.

    ProcessSelectionModeChanged(DataGridSelectionPropertyChangedEventArgs)

    Processes selection when the SelectionMode changes.

    Declaration
    protected abstract void ProcessSelectionModeChanged(DataGridSelectionPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    DataGridSelectionPropertyChangedEventArgs args

    The DataGridSelectionPropertyChangedEventArgs.

    Remarks

    When SelectionMode is changed from multiple to single/singleDeselect clears all the selection expect last selection. Application developers can override this to get notified when the SelectionMode chagnes.

    ProcessSourceCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)

    Processes selection when the source collection changes in SfDataGrid control.

    Declaration
    protected abstract void ProcessSourceCollectionChanged(NotifyCollectionChangedEventArgs e, CollectionChangedReason reason)
    Parameters
    Type Name Description
    System.Collections.Specialized.NotifyCollectionChangedEventArgs e

    The System.Collections.Specialized.NotifyCollectionChangedEventArgs.

    Syncfusion.Maui.DataGrid.CollectionChangedReason reason

    The Syncfusion.Maui.DataGrid.CollectionChangedReason.

    Remarks

    Application developers can override this to get notified when the items source collection changes in SfDataGrid.

    RaiseSelectionChanged(List<Object>, List<Object>)

    Raises the SelectionChanged event in a control.

    Declaration
    protected void RaiseSelectionChanged(List<object> addedItems, List<object> removedItems)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.Object> addedItems

    The list of added items.

    System.Collections.Generic.List<System.Object> removedItems

    The list of removed items.

    RaiseSelectionChanging(List<Object>, List<Object>)

    Raises the SelectionChanging event in a control.

    Declaration
    protected bool RaiseSelectionChanging(List<object> addedItems, List<object> removedItems)
    Parameters
    Type Name Description
    System.Collections.Generic.List<System.Object> addedItems

    The list of added items.

    System.Collections.Generic.List<System.Object> removedItems

    The list of removed items.

    Returns
    Type Description
    System.Boolean

    A boolean value specifying whether the selection is changed.

    ResumeUpdates()

    Resumes usual selection operation in SfDataGrid.

    Declaration
    protected void ResumeUpdates()

    SelectAll()

    Selects all the cells in SfDataGrid.

    Declaration
    protected abstract void SelectAll()
    Remarks

    This method is applicable only when SelectionMode is Microsoft.Maui.Controls.SelectionMode.Multiple.

    SuspendUpdates()

    Temporarily suspends the updates for the selection operation in SfDataGrid.

    Declaration
    protected void SuspendUpdates()

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved