menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridSelectionControllerBase - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridSelectionControllerBase

    Provides the base implementation for selection in SfDataGrid.

    Inheritance
    System.Object
    GridSelectionControllerBase
    GridCellSelectionController
    GridSelectionController
    Implements
    IGridSelectionController
    System.IDisposable
    Namespace: Syncfusion.SfDataGrid.XForms
    Assembly: Syncfusion.SfDataGrid.XForms.dll
    Syntax
    public abstract class GridSelectionControllerBase : Object, IGridSelectionController, IDisposable
    Remarks

    It provides the set of public properties and methods to customize selection.

    Constructors

    GridSelectionControllerBase(SfDataGrid)

    Initializes a new instance of the GridSelectionControllerBase class.

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

    The SfDataGrid.

    Properties

    DataGrid

    Gets the reference to the DataGrid control.

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

    SelectedRows

    Gets or sets the collection of selected rows.

    Declaration
    public GridSelectedRowsCollection SelectedRows { get; set; }
    Property Value
    Type Description
    Syncfusion.SfDataGrid.XForms.GridSelectedRowsCollection

    The collection of selected rows.

    Methods

    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(SelectionPropertyChangedHandlerArgs)

    Processes selection when the CurrentItem changes.

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

    SelectionPropertyChangedHandler arguments.

    Remarks

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

    ProcessKeyDown(String, Boolean, Boolean)

    Processes the key navigation when the keyboard interactions are performed in SfDataGrid UWP , WPF and macOS platform.

    Declaration
    protected virtual void ProcessKeyDown(string keyCode, bool isCtrlKeyPressed, bool isShiftKeyPressed)
    Parameters
    Type Name Description
    System.String keyCode

    Gets the key code.

    System.Boolean isCtrlKeyPressed

    Checks if control key is pressed.

    System.Boolean isShiftKeyPressed

    Checks if shift key is pressed.

    ProcessOnGroupChanged(GridGroupingEventArgs)

    Processes selection when the grouping is changed in a SfDataGrid control.

    Declaration
    protected abstract void ProcessOnGroupChanged(GridGroupingEventArgs groupColumnHandleArgs)
    Parameters
    Type Name Description
    GridGroupingEventArgs groupColumnHandleArgs

    The GridGroupingEventArgs.

    ProcessOnSortChanged(SortColumnChangedHandleArgs)

    Processes selection when SortColumnDescriptions is changed in SfDataGrid.

    Declaration
    protected abstract void ProcessOnSortChanged(SortColumnChangedHandleArgs sortColumnHandleArgs)
    Parameters
    Type Name Description
    SortColumnChangedHandleArgs sortColumnHandleArgs

    The SortColumnChangedHandleArgs.

    Remarks

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

    ProcessSelectedIndexChanged(SelectionPropertyChangedHandlerArgs)

    Processes selection when the SelectedIndex changes.

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

    The SelectionPropertyChangedHandlerArgs.

    Remarks

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

    ProcessSelectedItemChanged(SelectionPropertyChangedHandlerArgs)

    Processes selection when the SelectedItem changes.

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

    The SelectionPropertyChangedHandlerArgs.

    Remarks

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

    ProcessSelectionModeChanged(SelectionPropertyChangedHandlerArgs)

    Processes selection when the SelectionMode changes.

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

    The SelectionPropertyChangedHandlerArgs.

    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.SfDataGrid.XForms.CollectionChangedReason reason

    The Syncfusion.SfDataGrid.XForms.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 SfDataGrid 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 SfDataGrid 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()

    SuspendUpdates()

    Temporarily suspends the updates for the selection operation in SfDataGrid.

    Declaration
    protected void SuspendUpdates()

    Implements

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