Class GridCellSelectionController
Represents a class that implements GridSelectionControllerBase that contains methods for handling cell selection operations in a SfDataGrid control.
Inherited Members
Namespace: Syncfusion.SfDataGrid.XForms
Assembly: Syncfusion.SfDataGrid.XForms.dll
Syntax
public class GridCellSelectionController : GridSelectionControllerBase, IGridSelectionController, IDisposable
Constructors
GridCellSelectionController(SfDataGrid)
Initializes a new instance of the GridCellSelectionController class.
Declaration
public GridCellSelectionController(SfDataGrid dataGrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The SfDataGrid . |
Methods
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.
GetSelectionColor(RowColumnIndex, Object)
Returns the selection color for the selected cell.
Declaration
protected virtual Color GetSelectionColor(RowColumnIndex rowColumnIndex, object rowData)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | |
System.Object | rowData | The row data of the selected cell. |
Returns
Type | Description |
---|---|
Xamarin.Forms.Color | The selection color of the selected cell. |
Remarks
Application developers can override this to apply multiple selection color (different selection color to each cell).
HandleCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)
Processes selection by handling the possible collection changes in SfDataGrid.
Declaration
protected virtual void HandleCollectionChanged(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 of the type of collection changed in SfDataGrid.
HandleGridOperation(GridOperationHandlerArgs)
Handles and processes selection based on the Syncfusion.SfDataGrid.XForms.GridOperation performed in SfDataGrid.
Declaration
protected virtual void HandleGridOperation(GridOperationHandlerArgs args)
Parameters
Type | Name | Description |
---|---|---|
GridOperationHandlerArgs | args | The GridOperationHandlerArgs that contains the type of grid operation performed along with its arguments. |
Remarks
Application developers can override this to get notified of the Syncfusion.SfDataGrid.XForms.GridOperation performed in SfDataGrid.
HandlePointerOperation(GridPointerEventArgs, RowColumnIndex)
Processes selection based on the PointerOperation performed.
Declaration
protected 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. |
Remarks
Application developers can override this to get notifed of the PointerOperation performed in SfDataGrid.
HandleSelectionPropertyChanges(SelectionPropertyChangedHandlerArgs)
Handles and processes selection based on which selection related property has changed.
Declaration
protected virtual void HandleSelectionPropertyChanges(SelectionPropertyChangedHandlerArgs args)
Parameters
Type | Name | Description |
---|---|---|
SelectionPropertyChangedHandlerArgs | args | The SelectionPropertyChangedHandlerArgs that contains the corresponding property name, its old value and new value. |
Remarks
Application developers can override this method to get notified of which selection related property has changed.
ProcessCurrentItemChanged(SelectionPropertyChangedHandlerArgs)
Processes selection when the CurrentItem changes.
Declaration
protected override void ProcessCurrentItemChanged(SelectionPropertyChangedHandlerArgs args)
Parameters
Type | Name | Description |
---|---|---|
SelectionPropertyChangedHandlerArgs | args | SelectionPropertyChangedHandler arguments. |
Overrides
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.
ProcessingPointerTouchUp(RowColumnIndex)
Processes the pointer touch-up operation of a cell. Handles the touch-up operation in each cell of a SfDataGrid control.
Declaration
protected virtual void ProcessingPointerTouchUp(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | The row column index in which the touch-up action is performed. |
Remarks
Application developers can override this to get notified when a touch-up operation is performed on a cell.
ProcessOnColumnRemoved(GridColumn)
Processes selection when a GridColumn is removed from the SfDataGrid control.
Declaration
protected virtual void ProcessOnColumnRemoved(GridColumn column)
Parameters
Type | Name | Description |
---|---|---|
GridColumn | column | The column in which the touch-up action is performed. |
Remarks
Application developers can override this to get notified when a GridColumn is removed from the SfDataGrid control.
ProcessOnGroupChanged(GridGroupingEventArgs)
Processes selection when the grouping is changed in a SfDataGrid control.
Declaration
protected override void ProcessOnGroupChanged(GridGroupingEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GridGroupingEventArgs | args |
Overrides
ProcessOnSortChanged(SortColumnChangedHandleArgs)
Processes selection when the sorting is changed in aSfDataGrid control.
Declaration
protected override void ProcessOnSortChanged(SortColumnChangedHandleArgs sortColumnHandleArgs)
Parameters
Type | Name | Description |
---|---|---|
SortColumnChangedHandleArgs | sortColumnHandleArgs |
Overrides
ProcessSelectedIndexChanged(SelectionPropertyChangedHandlerArgs)
Processes selection when the SelectedIndex changes.
Declaration
protected override void ProcessSelectedIndexChanged(SelectionPropertyChangedHandlerArgs args)
Parameters
Type | Name | Description |
---|---|---|
SelectionPropertyChangedHandlerArgs | args |
Overrides
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 theSelectedItem changes in aSfDataGrid control.
Declaration
protected override void ProcessSelectedItemChanged(SelectionPropertyChangedHandlerArgs args)
Parameters
Type | Name | Description |
---|---|---|
SelectionPropertyChangedHandlerArgs | args |
Overrides
ProcessSelectionModeChanged(SelectionPropertyChangedHandlerArgs)
Processes theSelectionMode changes in aSfDataGrid control.
Declaration
protected override void ProcessSelectionModeChanged(SelectionPropertyChangedHandlerArgs args)
Parameters
Type | Name | Description |
---|---|---|
SelectionPropertyChangedHandlerArgs | 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 aSfDataGrid control.
Declaration
protected override void ProcessSourceCollectionChanged(NotifyCollectionChangedEventArgs e, CollectionChangedReason reason)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e | NotifyCollectionChangedEvent arguments. |
Syncfusion.SfDataGrid.XForms.CollectionChangedReason | reason | CollectionChanged reason. |
Overrides
RefreshSelection()
Refreshes the selections and sets values for theSelectedIndex, SelectedItem, CurrentItem and SelectedItems properties.
Declaration
protected virtual void RefreshSelection()
SetSelectionAnimation(GridCell)
Sets animation for the selected cell.
Declaration
protected virtual void SetSelectionAnimation(GridCell gridCell)
Parameters
Type | Name | Description |
---|---|---|
GridCell | gridCell | The view which holds the row data of the selected cell. |