menu

Xamarin.Android

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

    Show / Hide Table of Contents

    Class GridSelectionController

    Represents a class that implements IGridSelectionController that contains methods through IGridSelectionController for handling selection operations in a SfDataGrid control.

    Inheritance
    System.Object
    GridSelectionController
    Implements
    IGridSelectionController
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    Namespace: Syncfusion.SfDataGrid
    Assembly: Syncfusion.SfDataGrid.Android.dll
    Syntax
    public class GridSelectionController : Object, IGridSelectionController, INotifyPropertyChanged, IDisposable

    Constructors

    GridSelectionController()

    Initializes a new instance of the GridSelectionController class.

    Declaration
    public GridSelectionController()

    GridSelectionController(SfDataGrid)

    Initializes a new instance of the GridSelectionController class.

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

    The reference of the SfDataGrid.

    Properties

    DataGrid

    Gets or sets the reference of the SfDataGrid control.

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

    The reference of the SfDataGrid control.

    LastSelectedRowIndex

    Gets or sets a value for maintains the Last selected index

    Declaration
    protected int LastSelectedRowIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    The last index of the selected row.

    SelectedRows

    Gets or sets the collection of selected rows.

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

    The collection of selected rows.

    Methods

    ClearSelection()

    Clears the selection in a SfDataGrid control.

    Declaration
    public void ClearSelection()

    Dispose()

    Releases the resources used by the component.

    Declaration
    public void Dispose()

    Dispose(Boolean)

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

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

    GetSelectionColor(Int32, Object)

    Returns the selection color for selected row. This method can be overridden to apply multiple selection color.

    Declaration
    public virtual Color GetSelectionColor(int rowIndex, object rowData)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The index of the selected row.

    System.Object rowData

    The row data of the selected row.

    Returns
    Type Description
    Android.Graphics.Color

    The selection color for selected row.

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

    The reason for the collection change.

    HandleGridOperation(GridOperationHandlerArgs)

    Handles the grid operation to update selection.

    Declaration
    public virtual void HandleGridOperation(GridOperationHandlerArgs args)
    Parameters
    Type Name Description
    GridOperationHandlerArgs args

    The GridOperationHandlerArgs.

    HandlePointerOperation(GridPointerEventArgs, RowColumnIndex)

    Handles the pointer operation (touch-down or touch-up or double tap or moved) to handle selection.

    Declaration
    public virtual void HandlePointerOperation(GridPointerEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    GridPointerEventArgs args

    The GridPointerEventArgs.

    RowColumnIndex rowColumnIndex

    The row column index in which the pointer operation is performed.

    HandleSelectionPropertyChanges(SelectionPropertyChangedHandlerArgs)

    Handles the selection when the selection related properties gets changed.

    Declaration
    public virtual void HandleSelectionPropertyChanges(SelectionPropertyChangedHandlerArgs handle)
    Parameters
    Type Name Description
    SelectionPropertyChangedHandlerArgs handle

    The SelectionPropertyChangedHandlerArgs.

    ProcessCurrentItemChanged(SelectionPropertyChangedHandlerArgs)

    Adds the last selection to the current item

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

    SelectionPropertyChangedHandler arguments.

    ProcessingPointerTouchUp(RowColumnIndex, MotionEvent)

    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, MotionEvent args)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    The row column index in which the touch up action is performed.

    Android.Views.MotionEvent args

    The event arguments.

    ProcessOnGroupChanged(NotifyCollectionChangedEventArgs)

    Processes on group changed.

    Declaration
    protected virtual void ProcessOnGroupChanged(NotifyCollectionChangedEventArgs args)
    Parameters
    Type Name Description
    System.Collections.Specialized.NotifyCollectionChangedEventArgs args

    The collection changed arguments.

    ProcessOnSortChanged(SortColumnChangedHandleArgs)

    Processes on sort changed.

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

    The arguments for handling the sorting in the columns.

    ProcessSelectedIndexChanged(SelectionPropertyChangedHandlerArgs)

    Processes the selected index changed. Adds the first selected index to the selected index

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

    SelectionPropertyChangedHandler arguments.

    ProcessSelectedItemChanged(SelectionPropertyChangedHandlerArgs)

    Adds the firstSelection to the selected item

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

    SelectionPropertyChangedHandler arguments.

    ProcessSelectedItemsChanged(NotifyCollectionChangedEventArgs)

    Processes the SelectedItems collection changed to update the selection.

    Declaration
    public virtual void ProcessSelectedItemsChanged(NotifyCollectionChangedEventArgs e)
    Parameters
    Type Name Description
    System.Collections.Specialized.NotifyCollectionChangedEventArgs e

    The System.Collections.Specialized.NotifyCollectionChangedEventArgs.

    ProcessSelectionModeChanged(SelectionPropertyChangedHandlerArgs)

    Processes the selection mode changed. When selection mode changed from single/singleDeselect to multiple clears all the selection expect last selection

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

    SelectionPropertyChangedHandler arguments.

    ProcessSourceCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)

    Processes the source collection changed. Based on the collection changed reason.

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

    NotifyCollectionChangedEvent arguments

    Syncfusion.SfDataGrid.CollectionChangedReason reason

    CollectionChanged Reason

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

    Method which helps to Raise the SelectionChanged event.

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

    added items

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

    removed items

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

    Method which helps to raise the selection changing event.

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

    added items

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

    removed items

    Returns
    Type Description
    System.Boolean

    Returns the boolean value indicating whether to handle Selection Changing event

    RefreshSelection()

    Refreshes the selections and sets values for the SelectedIndex, SelectedItem, CurrentItem and SelectedItems properties.

    Declaration
    public void RefreshSelection()

    ResetSelection()

    Resets the selected index for the rows in SelectedRows collection.

    Declaration
    public void ResetSelection()

    SetSelectionAnimation(VirtualizingCellsControl)

    Sets animation for the selected row.

    Declaration
    protected virtual void SetSelectionAnimation(VirtualizingCellsControl rowElement)
    Parameters
    Type Name Description
    VirtualizingCellsControl rowElement

    The view which holds the row data of the selected row

    Events

    PropertyChanged

    Handles the property changed event.

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type
    System.ComponentModel.PropertyChangedEventHandler

    Implements

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