menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class CellSelectionController - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class CellSelectionController

    Represents the class that process the cell selection operation in SfDataGrid.

    Inheritance
    System.Object
    SelectionControllerBase
    CellSelectionController
    Inherited Members
    SelectionControllerBase.DataGrid
    SelectionControllerBase.IsSuspended
    SelectionControllerBase.PressedRowColumnIndex
    SelectionControllerBase.RaiseSelectionChanged(List<Object>, List<Object>)
    SelectionControllerBase.RaiseSelectionChanging(List<Object>, List<Object>)
    SelectionControllerBase.ResumeEvents()
    SelectionControllerBase.ResumeUpdates()
    SelectionControllerBase.SelectedRows
    SelectionControllerBase.SuspendEvents()
    SelectionControllerBase.SuspendUpdates()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.WinForms.DataGrid.Interactivity
    Assembly: Syncfusion.SfDataGrid.WinForms.dll
    Syntax
    public class CellSelectionController : SelectionControllerBase

    Constructors

    CellSelectionController(SfDataGrid)

    Initializes a new instance of the CellSelectionController class.

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

    The DataGrid.

    Methods

    ClearDetailsViewGridSelections(SfDataGrid)

    Overriden to clears the cell selections in DetailsViewDataGrid.

    Declaration
    protected override bool ClearDetailsViewGridSelections(SfDataGrid detailsViewDataGrid)
    Parameters
    Type Name Description
    SfDataGrid detailsViewDataGrid

    The selection of DetailsViewDataGrid to be cleared.

    Returns
    Type Description
    System.Boolean

    Returns true, if DetailsView selections cleared properly. Otherwise false.

    Overrides
    SelectionControllerBase.ClearDetailsViewGridSelections(SfDataGrid)

    DeleteSelectedRecords()

    Overriden to throw exception. Since Records deletion is not supported in Cell selection.

    Declaration
    protected override bool DeleteSelectedRecords()
    Returns
    Type Description
    System.Boolean

    Throws exception. Since Records deletion is not supported in Cell selection.

    Overrides
    SelectionControllerBase.DeleteSelectedRecords()

    HandleCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)

    Overriden to handle the collection changed.

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

    The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains the event data.

    CollectionChangedReason reason

    The collection changed reason.

    Overrides
    SelectionControllerBase.HandleCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)

    HandleDataSourceChanges(DataSourceChangedEventArgs)

    Overriden to process the cell selection when data source of the grid changed.

    Declaration
    protected override void HandleDataSourceChanges(DataSourceChangedEventArgs args)
    Parameters
    Type Name Description
    DataSourceChangedEventArgs args

    The DataSourceChangedEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.HandleDataSourceChanges(DataSourceChangedEventArgs)

    HandleGridOperations(DataGridOperationEventArgs)

    Overriden to process the cell selection for handling the grid operations.

    Declaration
    protected override void HandleGridOperations(DataGridOperationEventArgs args)
    Parameters
    Type Name Description
    DataGridOperationEventArgs args

    The DataGridOperationEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.HandleGridOperations(DataGridOperationEventArgs)

    HandleKeyOperations(KeyEventArgs)

    Overriden to handle the key operations.

    Declaration
    protected override void HandleKeyOperations(KeyEventArgs args)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs args

    The System.Windows.Forms.KeyEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.HandleKeyOperations(KeyEventArgs)

    HandlePointerOperations(DataGridPointerEventArgs, RowColumnIndex)

    Handles the mouse selection operations.

    Declaration
    protected override void HandlePointerOperations(DataGridPointerEventArgs args, RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    DataGridPointerEventArgs args

    The DataGridPointerEventArgs args.

    RowColumnIndex rowColumnIndex

    The row and column index.

    Overrides
    SelectionControllerBase.HandlePointerOperations(DataGridPointerEventArgs, RowColumnIndex)

    HandleSelectionPropertyChanges(SelectionPropertyChangedEventArgs)

    Overriden to handle the selection properties changed.

    Declaration
    protected override void HandleSelectionPropertyChanges(SelectionPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    SelectionPropertyChangedEventArgs args

    The SelectionPropertyChangedEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.HandleSelectionPropertyChanges(SelectionPropertyChangedEventArgs)

    ProcessArrowKeysForSingleMultipleSelection(KeyEventArgs)

    Process the cell selection for ArrowKeys and Tab keys.

    Declaration
    protected override void ProcessArrowKeysForSingleMultipleSelection(KeyEventArgs args)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs args

    The System.Windows.Forms.KeyEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.ProcessArrowKeysForSingleMultipleSelection(KeyEventArgs)

    ProcessCtrlModifiersKeys(KeyEventArgs)

    Process the navigation cell selection for the Ctrl modifier keys.

    Declaration
    protected override void ProcessCtrlModifiersKeys(KeyEventArgs args)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs args

    The System.Windows.Forms.KeyEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.ProcessCtrlModifiersKeys(KeyEventArgs)

    ProcessCurrentItemChanged(SelectionPropertyChangedEventArgs)

    Processes the cell selection when the CurrentItem property value changes.

    Declaration
    protected override void ProcessCurrentItemChanged(SelectionPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    SelectionPropertyChangedEventArgs args

    The SelectionPropertyChangedEventArgs contains the data for the CurrentItem property value changes.

    Overrides
    SelectionControllerBase.ProcessCurrentItemChanged(SelectionPropertyChangedEventArgs)

    ProcessDetailsViewEnterKeyDown(Int32)

    Process the selection of the DetailsViewDataGrid in the given row index.

    Declaration
    protected override bool ProcessDetailsViewEnterKeyDown(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    The details view row index.

    Returns
    Type Description
    System.Boolean

    Returns true, if selection is processed. Otherwise false.

    Overrides
    SelectionControllerBase.ProcessDetailsViewEnterKeyDown(Int32)

    ProcessDragSelection(RowColumnIndex)

    Overriden to process the drag cell selection.

    Declaration
    protected override void ProcessDragSelection(RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    The current dragging row column index.

    Overrides
    SelectionControllerBase.ProcessDragSelection(RowColumnIndex)

    ProcessEnterKey()

    Process the cell selection for Enter key down.

    Declaration
    protected override void ProcessEnterKey()
    Overrides
    SelectionControllerBase.ProcessEnterKey()

    ProcessGridSelectionModeChanged(SelectionPropertyChangedEventArgs)

    Processes the cell selection when the SelectionMode property value changes.

    Declaration
    protected override void ProcessGridSelectionModeChanged(SelectionPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    SelectionPropertyChangedEventArgs args

    The SelectionPropertyChangedEventArgs contains the data for the SelectionMode property value changes.

    Overrides
    SelectionControllerBase.ProcessGridSelectionModeChanged(SelectionPropertyChangedEventArgs)

    ProcessNavigationShiftSelection(RowColumnIndex)

    Process the navigation cell selection for the Shift modifier keys.

    Declaration
    protected override void ProcessNavigationShiftSelection(RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    The row and column index of the cell to be selected.

    Overrides
    SelectionControllerBase.ProcessNavigationShiftSelection(RowColumnIndex)

    ProcessOnAddNewRow(AddNewRowOperationEventArgs)

    Overriden to process the cell selection when addnew row position changed.

    Declaration
    protected override void ProcessOnAddNewRow(AddNewRowOperationEventArgs args)
    Parameters
    Type Name Description
    AddNewRowOperationEventArgs args

    The AddNewRowOperationEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.ProcessOnAddNewRow(AddNewRowOperationEventArgs)

    ProcessOnFilterApplied(FilterChangedEventArgs)

    Overriden to process the cell selection when filter is applied.

    Declaration
    protected override void ProcessOnFilterApplied(FilterChangedEventArgs args)
    Parameters
    Type Name Description
    FilterChangedEventArgs args

    The FilterChangedEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.ProcessOnFilterApplied(FilterChangedEventArgs)

    ProcessOnGroupChanged(GroupingOperationEventArgs)

    Overriden to process the cell selection when group changed.

    Declaration
    protected override void ProcessOnGroupChanged(GroupingOperationEventArgs args)
    Parameters
    Type Name Description
    GroupingOperationEventArgs args

    The GroupingOperationEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.ProcessOnGroupChanged(GroupingOperationEventArgs)

    ProcessOnPageChanged()

    Processes the cell selection when the page is navigated using the SfDataPager.

    Declaration
    protected override void ProcessOnPageChanged()
    Overrides
    SelectionControllerBase.ProcessOnPageChanged()

    ProcessOnRowHeaderChanged()

    Overriden to process the cell selection when row header changed.

    Declaration
    protected override void ProcessOnRowHeaderChanged()
    Overrides
    SelectionControllerBase.ProcessOnRowHeaderChanged()

    ProcessOnSortChanged(SortColumnChangedEventArgs)

    Process the cell selection on SortColumnDescriptions changed.

    Declaration
    protected override void ProcessOnSortChanged(SortColumnChangedEventArgs args)
    Parameters
    Type Name Description
    SortColumnChangedEventArgs args

    The SortColumnChangedEventArgs that contains event data.

    Overrides
    SelectionControllerBase.ProcessOnSortChanged(SortColumnChangedEventArgs)

    ProcessSelectedIndexChanged(SelectionPropertyChangedEventArgs)

    Processes the cell selection when the SelectedIndex property value changes.

    Declaration
    protected override void ProcessSelectedIndexChanged(SelectionPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    SelectionPropertyChangedEventArgs args

    The SelectionPropertyChangedEventArgs contains the data for the SelectedIndex property value changes.

    Overrides
    SelectionControllerBase.ProcessSelectedIndexChanged(SelectionPropertyChangedEventArgs)

    ProcessSelectedItemChanged(SelectionPropertyChangedEventArgs)

    Processes the cell selection when the SelectedItem property value changes.

    Declaration
    protected override void ProcessSelectedItemChanged(SelectionPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    SelectionPropertyChangedEventArgs args

    The SelectionPropertyChangedEventArgs contains the data for the SelectedItem property value changes.

    Overrides
    SelectionControllerBase.ProcessSelectedItemChanged(SelectionPropertyChangedEventArgs)

    ProcessSelection(RowColumnIndex, RowColumnIndex, Boolean)

    Process the selection of the given row and column index.

    Declaration
    protected void ProcessSelection(RowColumnIndex rowColumnIndex, RowColumnIndex previousRowColumnIndex, bool needToSelectWholeRow = false)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    The row and column index to be processed for selection.

    RowColumnIndex previousRowColumnIndex

    The previous row and column index of current cell.

    System.Boolean needToSelectWholeRow

    A value indicating whether to select cells in whole row.

    ProcessSelectionAndCurrentCell(RowColumnIndex)

    Process the cell selection with current cell.

    Declaration
    protected override void ProcessSelectionAndCurrentCell(RowColumnIndex rowColumnIndex)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    The row and column index of the cell.

    Overrides
    SelectionControllerBase.ProcessSelectionAndCurrentCell(RowColumnIndex)

    ProcessShiftCtrlModifiersKeys(KeyEventArgs)

    Process the navigation cell selection for the Shift + Ctrl modifier keys.

    Declaration
    protected override void ProcessShiftCtrlModifiersKeys(KeyEventArgs args)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs args

    The System.Windows.Forms.KeyEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.ProcessShiftCtrlModifiersKeys(KeyEventArgs)

    ProcessShiftModifiersKeys(KeyEventArgs)

    Process the cell selection for the shift modifier keys.

    Declaration
    protected override void ProcessShiftModifiersKeys(KeyEventArgs args)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs args

    The System.Windows.Forms.KeyEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.ProcessShiftModifiersKeys(KeyEventArgs)

    ProcessSourceCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)

    Process the cell collection for Source collection changed.

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

    The NotifyCollectionChangedEventArgs that contains event data.

    CollectionChangedReason reason

    The CollectionChangedReason.

    Overrides
    SelectionControllerBase.ProcessSourceCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)

    ProcessSpecialKeysForSingleMultiple(KeyEventArgs)

    Process the cell selection for special keys in single and multiple modes.

    Declaration
    protected override void ProcessSpecialKeysForSingleMultiple(KeyEventArgs args)
    Parameters
    Type Name Description
    System.Windows.Forms.KeyEventArgs args

    The System.Windows.Forms.KeyEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.ProcessSpecialKeysForSingleMultiple(KeyEventArgs)

    ProcessUnboundRowChanged(UnboundRowCollectionChangedEventArgs)

    Overriden to process the cell selection when unbound row changed.

    Declaration
    protected override void ProcessUnboundRowChanged(UnboundRowCollectionChangedEventArgs args)
    Parameters
    Type Name Description
    UnboundRowCollectionChangedEventArgs args

    The UnboundRowCollectionChangedEventArgs that contains the event data.

    Overrides
    SelectionControllerBase.ProcessUnboundRowChanged(UnboundRowCollectionChangedEventArgs)

    ResetSelection(RowColumnIndex, List<Object>)

    Resets the selection.

    Declaration
    protected void ResetSelection(RowColumnIndex rowColumnIndex, List<object> removedItems)
    Parameters
    Type Name Description
    RowColumnIndex rowColumnIndex

    The row and column index of the cell to be selected.

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

    The collection of cells that needs to removed from selection.

    UpdateCurrentCell()

    Updates the current cell based on the CurrentItem.

    Declaration
    protected override void UpdateCurrentCell()
    Overrides
    SelectionControllerBase.UpdateCurrentCell()
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved