menu

WinForms

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

    Show / Hide Table of Contents

    Class RowSelectionController

    Represent the class for process the row selection operation in data grid.

    Inheritance
    System.Object
    SelectionControllerBase
    RowSelectionController
    Inherited Members
    SelectionControllerBase.ClearDetailsViewGridSelections(SfDataGrid)
    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 RowSelectionController : SelectionControllerBase

    Constructors

    RowSelectionController(SfDataGrid)

    Initializes a new instance of the RowSelectionController class.

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

    The dataGrid.

    Methods

    AddSelection(Object, Int32)

    Adds the row selection for the specified list of items.

    Declaration
    protected void AddSelection(object recordEntry, int rowIndex)
    Parameters
    Type Name Description
    System.Object recordEntry

    The corresponding list of items to add the selection.

    System.Int32 rowIndex

    The corresponding row index for add the selection.

    DeleteSelectedRecords()

    Removes the selected rows from the SfDataGrid control.

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

    Returns true, if record deletion operation completed. Otherwise returns false.

    Overrides
    SelectionControllerBase.DeleteSelectedRecords()

    HandleCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)

    Handles the row selection when the collection changes on DataSource properties in SfDataGrid.

    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 data for collection changes.

    CollectionChangedReason reason

    Contains the for collection changes.

    Overrides
    SelectionControllerBase.HandleCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)
    Remarks

    This method is called when the collection changes on DataSource properties in SfDataGrid.

    HandleDataSourceChanges(DataSourceChangedEventArgs)

    Handles selection when the DataSource of teh SFDataGrid is changed.

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

    The that contains the old and new data source objects.

    Overrides
    SelectionControllerBase.HandleDataSourceChanges(DataSourceChangedEventArgs)

    HandleGridOperations(DataGridOperationEventArgs)

    Handles selection when any of the GridOperation such as sorting, filtering, grouping and etc performed in DataGrid.

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

    The GridOperationsHandlerArgs that contains the type of grid operations and its arguments.

    Overrides
    SelectionControllerBase.HandleGridOperations(DataGridOperationEventArgs)
    Remarks

    This method is called when any of the Grid.GridOperation are performed in DataGrid.

    HandleKeyOperations(KeyEventArgs)

    Process the key operations for SfDataGrid.

    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 selection when any of the PointerOperation such as pressed,released,moved,and etc performed in DataGrid.

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

    The DataGridPointerEventArgs that contains the type of pointer operations and its arguments.

    RowColumnIndex rowColumnIndex

    The corresponding rowColumnIndex of the cell.

    Overrides
    SelectionControllerBase.HandlePointerOperations(DataGridPointerEventArgs, RowColumnIndex)
    Remarks

    This method is invoked when any of the PointerOperation are performed in DataGrid.

    HandleSelectionPropertyChanges(SelectionPropertyChangedEventArgs)

    Handles selection when the selection property such as SelectedIndex,SelectedItem and selectionMode value changes occurred.

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

    The that contains the corresponding property name and its value changes.

    Overrides
    SelectionControllerBase.HandleSelectionPropertyChanges(SelectionPropertyChangedEventArgs)
    Remarks

    This method is invoked when the selection property values such as SelectedIndex,SelectedItem and selectionMode are changed in SFDataGrid.

    ProcessArrowKeysForSingleMultipleSelection(KeyEventArgs)

    Process the arrow key navigation operations for SfDataGrid.

    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 control modifiers key navigation operations for SfDataGrid.

    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 row selection when the CurrentItem property value changes.

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

    The contains the data for the CurrentItem property value changes.

    Overrides
    SelectionControllerBase.ProcessCurrentItemChanged(SelectionPropertyChangedEventArgs)

    ProcessDetailsViewEnterKeyDown(Int32)

    Process the Enter key down operation of the DetailsView grid.

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

    The row index.

    Returns
    Type Description
    System.Boolean

    Returns true if DetailsView index is process. Otherwise false.

    Overrides
    SelectionControllerBase.ProcessDetailsViewEnterKeyDown(Int32)

    ProcessDragSelection(RowColumnIndex)

    Processes the row selection for the specified row index.

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

    The corresponding row column index to select the row.

    Overrides
    SelectionControllerBase.ProcessDragSelection(RowColumnIndex)

    ProcessEnterKey()

    Process the enter key navigation operations for SfDataGrid.

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

    ProcessGridSelectionModeChanged(SelectionPropertyChangedEventArgs)

    Processes the row selection when the Syncfusion.WinForms.DataGrid.SfDataGrid.selectionMode property value changes.

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

    The contains the data for the Syncfusion.WinForms.DataGrid.SfDataGrid.selectionMode property value changes.

    Overrides
    SelectionControllerBase.ProcessGridSelectionModeChanged(SelectionPropertyChangedEventArgs)

    ProcessNavigationDragSelection(RowColumnIndex, RowColumnIndex)

    Process the drag selection for navigation.

    Declaration
    protected void ProcessNavigationDragSelection(RowColumnIndex startRowColumnIndex, RowColumnIndex endRowColumnIndex)
    Parameters
    Type Name Description
    RowColumnIndex startRowColumnIndex

    The corrsponding start index for selection.

    RowColumnIndex endRowColumnIndex

    The corrsponding end index for selection.

    ProcessNavigationShiftSelection(RowColumnIndex)

    Process the shift selection for navigation.

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

    The corrsponding row index for selection.

    Overrides
    SelectionControllerBase.ProcessNavigationShiftSelection(RowColumnIndex)

    ProcessOnAddNewRow(AddNewRowOperationEventArgs)

    Processes the row selection when new row is initiated or committed and the position of AddNewRow is changed.

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

    Contains data for the AddNewRow operation.

    Overrides
    SelectionControllerBase.ProcessOnAddNewRow(AddNewRowOperationEventArgs)

    ProcessOnFilterApplied(FilterChangedEventArgs)

    Processes the row selection when the column is filtered in SFDataGrid.

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

    Contains the data related to the filtering operation.

    Overrides
    SelectionControllerBase.ProcessOnFilterApplied(FilterChangedEventArgs)
    Remarks

    This method refreshes the selection while filter the column in SFDataGrid.

    ProcessOnGroupChanged(GroupingOperationEventArgs)

    Processes the row selection when the column is grouped in SfDataGrid.

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

    Contains the data related to the grouping operation.

    Overrides
    SelectionControllerBase.ProcessOnGroupChanged(GroupingOperationEventArgs)
    Remarks

    This method refreshes the selection while grouping the column in SFDataGrid.

    ProcessOnPageChanged()

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

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

    ProcessOnRowHeaderChanged()

    Processes the selection when the ShowRowHeader property value changes.

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

    ProcessOnSortChanged(SortColumnChangedEventArgs)

    Process the row 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)

    ProcessSelectedEntriesChanged(NotifyCollectionChangedEventArgs)

    Processes the row selection when the SelectedNodeEntires property value changes.

    Declaration
    protected void ProcessSelectedEntriesChanged(NotifyCollectionChangedEventArgs e)
    Parameters
    Type Name Description
    System.Collections.Specialized.NotifyCollectionChangedEventArgs e

    The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains data for SelectedNodeEntries collection changes.

    ProcessSelectedIndexChanged(SelectionPropertyChangedEventArgs)

    Processes the row selection when the SelectedIndex property value changes.

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

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

    Overrides
    SelectionControllerBase.ProcessSelectedIndexChanged(SelectionPropertyChangedEventArgs)

    ProcessSelectedItemChanged(SelectionPropertyChangedEventArgs)

    Processes the row selection when the SelectedItem property value changes.

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

    The contains the data for the SelectedItem property value changes.

    Overrides
    SelectionControllerBase.ProcessSelectedItemChanged(SelectionPropertyChangedEventArgs)

    ProcessSelectedItemsChanged(NotifyCollectionChangedEventArgs)

    Processes the row selection when the SelectedItems property value changes.

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

    The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains data for SelectedItems collection changes.

    ProcessSelection(RowColumnIndex, RowColumnIndex, Boolean, Boolean)

    Processes the row selection for the specified row index.

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

    The corresponding row column index to select the row.

    RowColumnIndex previousRowColumnIndex

    The previous row column index.

    System.Boolean isDragSelection

    Specifies the value is a drag selection or not

    System.Boolean isNavigationSelection

    Specifies the value is a navigation selection or not

    ProcessSelectionAndCurrentCell(RowColumnIndex)

    Process the Selection and current cell for corresponding row column index.

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

    The row column index for selection process.

    Overrides
    SelectionControllerBase.ProcessSelectionAndCurrentCell(RowColumnIndex)

    ProcessShiftCtrlModifiersKeys(KeyEventArgs)

    Process the Shif and control modifiers key navigation operations for SfDataGrid.

    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 shift modifiers key navigation operations for SfDataGrid.

    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)

    Processes the row selection when the DataSource property value changes.

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

    The System.Collections.Specialized.NotifyCollectionChangedEventArgs that contains data for source collection changes.

    CollectionChangedReason reason

    The CollectionChangedReason contains reason for the source collection changes.

    Overrides
    SelectionControllerBase.ProcessSourceCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)

    ProcessSpecialKeysForSingleMultiple(KeyEventArgs)

    This method process special key navigation ctrl or shift key not pressed.

    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)

    Processes the row selection when the UnboundRow collection changes.

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

    Contains data for the UnboundRow collection changes.

    Overrides
    SelectionControllerBase.ProcessUnboundRowChanged(UnboundRowCollectionChangedEventArgs)

    RefreshSelectedEntries()

    Refresh the selected entries while processing row positions.

    Declaration
    protected void RefreshSelectedEntries()

    RefreshSelectedItems()

    Refresh the selected items while processing the filtering.

    Declaration
    protected void RefreshSelectedItems()

    RemoveSelection(Object)

    Removes the selection for the specified list of items.

    Declaration
    protected void RemoveSelection(object removedItem)
    Parameters
    Type Name Description
    System.Object removedItem

    The corresponding removed item the selection.

    UpdateCurrentCell()

    Updates the current cell based on the CurrentItem.

    Declaration
    protected override void UpdateCurrentCell()
    Overrides
    SelectionControllerBase.UpdateCurrentCell()
    In This Article
    • Constructors
      • RowSelectionController(SfDataGrid)
    • Methods
      • AddSelection(Object, Int32)
      • DeleteSelectedRecords()
      • HandleCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)
      • HandleDataSourceChanges(DataSourceChangedEventArgs)
      • HandleGridOperations(DataGridOperationEventArgs)
      • HandleKeyOperations(KeyEventArgs)
      • HandlePointerOperations(DataGridPointerEventArgs, RowColumnIndex)
      • HandleSelectionPropertyChanges(SelectionPropertyChangedEventArgs)
      • ProcessArrowKeysForSingleMultipleSelection(KeyEventArgs)
      • ProcessCtrlModifiersKeys(KeyEventArgs)
      • ProcessCurrentItemChanged(SelectionPropertyChangedEventArgs)
      • ProcessDetailsViewEnterKeyDown(Int32)
      • ProcessDragSelection(RowColumnIndex)
      • ProcessEnterKey()
      • ProcessGridSelectionModeChanged(SelectionPropertyChangedEventArgs)
      • ProcessNavigationDragSelection(RowColumnIndex, RowColumnIndex)
      • ProcessNavigationShiftSelection(RowColumnIndex)
      • ProcessOnAddNewRow(AddNewRowOperationEventArgs)
      • ProcessOnFilterApplied(FilterChangedEventArgs)
      • ProcessOnGroupChanged(GroupingOperationEventArgs)
      • ProcessOnPageChanged()
      • ProcessOnRowHeaderChanged()
      • ProcessOnSortChanged(SortColumnChangedEventArgs)
      • ProcessSelectedEntriesChanged(NotifyCollectionChangedEventArgs)
      • ProcessSelectedIndexChanged(SelectionPropertyChangedEventArgs)
      • ProcessSelectedItemChanged(SelectionPropertyChangedEventArgs)
      • ProcessSelectedItemsChanged(NotifyCollectionChangedEventArgs)
      • ProcessSelection(RowColumnIndex, RowColumnIndex, Boolean, Boolean)
      • ProcessSelectionAndCurrentCell(RowColumnIndex)
      • ProcessShiftCtrlModifiersKeys(KeyEventArgs)
      • ProcessShiftModifiersKeys(KeyEventArgs)
      • ProcessSourceCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)
      • ProcessSpecialKeysForSingleMultiple(KeyEventArgs)
      • ProcessUnboundRowChanged(UnboundRowCollectionChangedEventArgs)
      • RefreshSelectedEntries()
      • RefreshSelectedItems()
      • RemoveSelection(Object)
      • UpdateCurrentCell()
    Was this page helpful? Yes No
    Thank you for your feedback!
    Thank you for your feedback and comments. We will rectify this as soon as possible!
    An unknown error has occurred. Please try again.
    SEND FEEDBACK REGARDING THIS TOPIC

    Please provide additional information

    Please provide additional information

    Please provide additional information

    Please provide additional information
    Please provide additional information
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved