Class SelectionControllerBase
Represent the class for process the selection operation in data grid.
Inherited Members
Namespace: Syncfusion.WinForms.DataGrid.Interactivity
Assembly: Syncfusion.SfDataGrid.WinForms.dll
Syntax
public abstract class SelectionControllerBase
Constructors
SelectionControllerBase(SfDataGrid)
Initializes a new instance of the SelectionControllerBase class.
Declaration
public SelectionControllerBase(SfDataGrid dataGrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | dataGrid | The data grid that used to process the selection. |
Properties
DataGrid
Gets or sets the reference to the DataGrid control.
Declaration
public SfDataGrid DataGrid { get; protected set; }
Property Value
Type | Description |
---|---|
SfDataGrid | The reference to the DataGrid control. |
IsSuspended
Gets or sets a value indicating whether the selection is suspended.
Declaration
protected bool IsSuspended { get; set; }
Property Value
Type |
---|
System.Boolean |
PressedRowColumnIndex
Gets or sets the pressed RowColumnIndex of DataGrid.
Declaration
protected RowColumnIndex PressedRowColumnIndex { get; set; }
Property Value
Type |
---|
RowColumnIndex |
SelectedRows
Gets or sets the collection of object that contains the information of selected rows.
Declaration
protected SelectedItemsCollection SelectedRows { get; set; }
Property Value
Type | Description |
---|---|
SelectedItemsCollection | The collection of object. |
Methods
ClearDetailsViewGridSelections(SfDataGrid)
Clears the selection of the DetailsViewDataGrid.
Declaration
protected virtual bool ClearDetailsViewGridSelections(SfDataGrid detailsViewDataGrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | detailsViewDataGrid | The DetailsViewDataGrid. |
Returns
Type | Description |
---|---|
System.Boolean | Return true, if selection of DetailsViewDataGrid is cleared. Otherwise false. |
DeleteSelectedRecords()
Removes the selected rows from the SfDataGrid control.
Declaration
protected abstract bool DeleteSelectedRecords()
Returns
Type | Description |
---|---|
System.Boolean | Returns true, if record deletion operation completed. Otherwise returns false. |
HandleCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)
Handles the selection when the DataSource property collection changes.
Declaration
protected abstract 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 | The |
Remarks
This method is called when the collection changes on DataSource properties in SfDataGrid.
HandleDataSourceChanges(DataSourceChangedEventArgs)
Handles the selection operation when data source of DataGrid is changed.
Declaration
protected abstract void HandleDataSourceChanges(DataSourceChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DataSourceChangedEventArgs | args | The |
HandleGridOperations(DataGridOperationEventArgs)
Handles the selection when any of the GridOperation such as Sorting,Filtering,Grouping and etc that are performed in DataGrid.
Declaration
protected abstract void HandleGridOperations(DataGridOperationEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
DataGridOperationEventArgs | args | The |
HandleKeyOperations(KeyEventArgs)
Handles selection when any of the Key operations such as Up,Down,Left,and etc performed in DataGrid.
Declaration
protected abstract void HandleKeyOperations(KeyEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyEventArgs | args | The System.Windows.Forms.KeyEventArgs that contains the key arguments. |
HandlePointerOperations(DataGridPointerEventArgs, RowColumnIndex)
Handles selection when any of the PointerOperation such as pressed,released,moved,and etc performed in DataGrid.
Declaration
protected abstract 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. |
Remarks
This method is invoked when any of the PointerOperation are performed in DataGrid.
HandleSelectionPropertyChanges(SelectionPropertyChangedEventArgs)
Handles the selection when any of the selection property such as SelectedIndex,SelectedItem and selectionMode values changed.
Declaration
protected abstract void HandleSelectionPropertyChanges(SelectionPropertyChangedEventArgs handle)
Parameters
Type | Name | Description |
---|---|---|
SelectionPropertyChangedEventArgs | handle | The |
ProcessArrowKeysForSingleMultipleSelection(KeyEventArgs)
Process the selection of arrow keys for single and multiple modes.
Declaration
protected abstract void ProcessArrowKeysForSingleMultipleSelection(KeyEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyEventArgs | args | The System.Windows.Forms.KeyEventArgs that contains the event data. |
ProcessCtrlModifiersKeys(KeyEventArgs)
Process the navigation selection for the Ctrl modifier keys.
Declaration
protected abstract void ProcessCtrlModifiersKeys(KeyEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyEventArgs | args | The System.Windows.Forms.KeyEventArgs that contains the event data. |
ProcessCurrentItemChanged(SelectionPropertyChangedEventArgs)
Processes the selection when the CurrentItem property value changes.
Declaration
protected abstract void ProcessCurrentItemChanged(SelectionPropertyChangedEventArgs handle)
Parameters
Type | Name | Description |
---|---|---|
SelectionPropertyChangedEventArgs | handle | The |
ProcessDetailsViewEnterKeyDown(Int32)
Process the selection of the DetailsViewDataGrid in the given row index.
Declaration
protected abstract 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. |
ProcessDragSelection(RowColumnIndex)
Process the drag selection.
Declaration
protected abstract void ProcessDragSelection(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | The dragging row column index. |
ProcessEnterKey()
Process the selection for Enter key down.
Declaration
protected abstract void ProcessEnterKey()
ProcessGridSelectionModeChanged(SelectionPropertyChangedEventArgs)
Processes the selection when the Syncfusion.WinForms.DataGrid.SfDataGrid.selectionMode property value changes.
Declaration
protected abstract void ProcessGridSelectionModeChanged(SelectionPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
SelectionPropertyChangedEventArgs | args | The |
ProcessNavigationShiftSelection(RowColumnIndex)
Process the navigation selection for the Shift modifier keys.
Declaration
protected abstract void ProcessNavigationShiftSelection(RowColumnIndex rowColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnIndex | The row and column index to be selected. |
ProcessOnAddNewRow(AddNewRowOperationEventArgs)
Processes the row selection when new row is initiated or committed and the position of AddNewRow is changed.
Declaration
protected abstract void ProcessOnAddNewRow(AddNewRowOperationEventArgs handle)
Parameters
Type | Name | Description |
---|---|---|
AddNewRowOperationEventArgs | handle | Contains data for the AddNewRow operation. |
ProcessOnFilterApplied(FilterChangedEventArgs)
Processes the selection when the column is filtered in DataGrid.
Declaration
protected abstract void ProcessOnFilterApplied(FilterChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
FilterChangedEventArgs | args | Contains the data for collection changes during filtering action. |
Remarks
This method refreshes the selection while filtering the column in DataGrid.
ProcessOnGroupChanged(GroupingOperationEventArgs)
Processes the selection when the column is grouped in DataGrid.
Declaration
protected abstract void ProcessOnGroupChanged(GroupingOperationEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
GroupingOperationEventArgs | args | Contains the data for collection changes during grouping action. |
Remarks
This method refreshes the selection while grouping the column in DataGrid.
ProcessOnPageChanged()
Processes the selection while navigating from one page in to another page in SfDataPager.
Declaration
protected abstract void ProcessOnPageChanged()
ProcessOnRowHeaderChanged()
Processes the selection when the ShowRowHeader property value changes.
Declaration
protected abstract void ProcessOnRowHeaderChanged()
Remarks
This method refreshes the selection while changing the ShowRowHeader property.
ProcessOnSortChanged(SortColumnChangedEventArgs)
Process the selection on SortColumnDescriptions changed.
Declaration
protected abstract void ProcessOnSortChanged(SortColumnChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
SortColumnChangedEventArgs | args | The SortColumnChangedEventArgs that contains event data. |
ProcessSelectedIndexChanged(SelectionPropertyChangedEventArgs)
Processes the selection when the SelectedIndex property value changes.
Declaration
protected abstract void ProcessSelectedIndexChanged(SelectionPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
SelectionPropertyChangedEventArgs | args | The SelectionPropertyChangedEventArgs contains the data for the SelectedIndex property value changes. |
ProcessSelectedItemChanged(SelectionPropertyChangedEventArgs)
Processes the selection when the SelectedItem property value changes.
Declaration
protected abstract void ProcessSelectedItemChanged(SelectionPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
SelectionPropertyChangedEventArgs | args | The |
ProcessSelectionAndCurrentCell(RowColumnIndex)
Process the selection with current cell.
Declaration
protected abstract void ProcessSelectionAndCurrentCell(RowColumnIndex rowColumnindex)
Parameters
Type | Name | Description |
---|---|---|
RowColumnIndex | rowColumnindex | The row and column index of the cell. |
ProcessShiftCtrlModifiersKeys(KeyEventArgs)
Process the navigation selection for the Shift + Ctrl modifier keys.
Declaration
protected abstract void ProcessShiftCtrlModifiersKeys(KeyEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyEventArgs | args | The System.Windows.Forms.KeyEventArgs that contains the event data. |
ProcessShiftModifiersKeys(KeyEventArgs)
Process the selection for the shift modifier keys.
Declaration
protected abstract void ProcessShiftModifiersKeys(KeyEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyEventArgs | args | The System.Windows.Forms.KeyEventArgs that contains the event data. |
ProcessSourceCollectionChanged(NotifyCollectionChangedEventArgs, CollectionChangedReason)
Processes the selection when the DataSource property value changes.
Declaration
protected abstract 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. |
ProcessSpecialKeysForSingleMultiple(KeyEventArgs)
Process the selection for special keys in single and multiple modes.
Declaration
protected abstract void ProcessSpecialKeysForSingleMultiple(KeyEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.KeyEventArgs | args | The System.Windows.Forms.KeyEventArgs that contains the event data. |
ProcessUnboundRowChanged(UnboundRowCollectionChangedEventArgs)
Processes the row selection when the UnboundRow collection changes.
Declaration
protected abstract void ProcessUnboundRowChanged(UnboundRowCollectionChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
UnboundRowCollectionChangedEventArgs | args | Contains data for the UnboundRow collection changes. |
RaiseSelectionChanged(List<Object>, List<Object>)
Raises the
Declaration
protected void RaiseSelectionChanged(List<object> addedItems, List<object> removedItems)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.Object> | addedItems | Contains the items that were selected. |
System.Collections.Generic.List<System.Object> | removedItems | Contains the items that were unselected. |
RaiseSelectionChanging(List<Object>, List<Object>)
Raises the
Declaration
protected bool RaiseSelectionChanging(List<object> addedItems, List<object> removedItems)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.Object> | addedItems | Contains the items that were selected. |
System.Collections.Generic.List<System.Object> | removedItems | Contains the items that were unselected. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the |
ResumeEvents()
Resumes usual selection and current cell events operation in SfDataGrid.
Declaration
protected void ResumeEvents()
ResumeUpdates()
Resumes usual selection operation in SfDataGrid.
Declaration
protected void ResumeUpdates()
SuspendEvents()
Temporarily suspends the updates for the selection and current cell events operation in SfDataGrid.
Declaration
protected void SuspendEvents()
SuspendUpdates()
Temporarily suspends the updates for the selection operation in SfDataGrid.
Declaration
protected void SuspendUpdates()
UpdateCurrentCell()
Updates the current cell based on the CurrentItem.
Declaration
protected abstract void UpdateCurrentCell()