Class RowSelectionController
Represent the class for process the row selection operation in data grid.
Inherited Members
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
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 |
Overrides
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 |
Overrides
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
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
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
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 |
Overrides
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
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
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 |
Overrides
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
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
ProcessEnterKey()
Process the enter key navigation operations for SfDataGrid.
Declaration
protected override void ProcessEnterKey()
Overrides
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 |
Overrides
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
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
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
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
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
ProcessOnRowHeaderChanged()
Processes the selection when the ShowRowHeader property value changes.
Declaration
protected override void ProcessOnRowHeaderChanged()
Overrides
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
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
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 |
Overrides
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
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
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
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
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
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
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()