Class CellSelectionController
Represents the class that process the cell selection operation in SfDataGrid.
Inherited Members
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
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
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
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
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
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
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
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
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
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
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
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
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
ProcessEnterKey()
Process the cell selection for Enter key down.
Declaration
protected override void ProcessEnterKey()
Overrides
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
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
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
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
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
ProcessOnPageChanged()
Processes the cell selection when the page is navigated using the SfDataPager.
Declaration
protected override void ProcessOnPageChanged()
Overrides
ProcessOnRowHeaderChanged()
Overriden to process the cell selection when row header changed.
Declaration
protected override void ProcessOnRowHeaderChanged()
Overrides
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
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
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
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
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
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
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
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
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
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()