What are the two selection types in WinForms GridGroupingControl?
Selection types
There are two selection types in the GridGroupingControl, they are
1. Range selection (cell-based selection)
2. Record selection
Range selection
You can turn on this selection by setting the grid.tableOptions.AllowSelections to something other than “None”. By this selection, you can select range of cells/columns/rows. This selection functionality raises events like the grid.TableModel.SelectionChanging/Changed.
C#
//Inherited GridControlBase Selection this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.Any;
VB
'Inherited GridControlBase Selection Me.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.Any
The following screenshots illustrates range selection.
Figure 1: Range selection (Cell based selection)
Record selection
This selection is a record based selection support that is specific to the GridGroupingControl. You can turn on this selection support by setting the grid.TableOptions.AllowSelections to “None” and setting the grid.TableOptions.ListBoxSelectionMode to something other than “None”. This selection support raises the grid.SelectedRecordsChanged/Changing rather than raising the grid.TableModel.SelectionChanging/Changed events.
C#
//Record based Selection this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = System.Windows.Forms.SelectionMode.One;
VB
'Record based Selection Me.gridGroupingControl1.TableOptions.ListBoxSelectionMode = System.Windows.Forms.SelectionMode.One
The following screenshots illustrates record selection.
Figure 2: Record based selection
The default value of the gridGroupingControl1.TableOptions.AllowSelection is “None”. With this, you can able to select the current cell alone.
Samples:
Reference link: https://help.syncfusion.com/windowsforms/gridgrouping/selections