Articles in this section

What are the two selection types in WinForms GridGroupingControl?

Selection types


There are two selection types in the
WinForms 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.

//Inherited GridControlBase Selection
this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.Any;
'Inherited GridControlBase Selection
Me.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.Any

The following screenshots illustrate range selection.

Show the range selection types


  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.

//Record based Selection
this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = System.Windows.Forms.SelectionMode.One;
'Record based Selection
Me.gridGroupingControl1.TableOptions.ListBoxSelectionMode = System.Windows.Forms.SelectionMode.One

The following screenshots illustrate record selection.

Show record based selection

   
Figure
2: Record based selection

Note:

The default value of the gridGroupingControl1.TableOptions.AllowSelection is None. With this, you can select the current cell alone.

 

Samples:

C#: SelectionModesInGGC

VB: SelectionModesInGGC

 

Reference Link: Selections

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied