Touch Support in Windows Forms GridGrouping (GridGroupingControl)
28 Apr 2021 / 3 minutes to read
GridGroupingControl provides the swipe scrolling, panning, zooming and touch selection (bubble selection) touch supports. The touch support for grid can be enabled by setting the EnableTouchMode property to
true. This will enable the grid to support the swiping, panning, touch selection (bubble selection) and zooming. The default value of
EnableTouchMode property is
//Enable the touch mode this.gridGroupingControl1.EnableTouchMode = true;
'Enable the touch mode Me.gridGroupingControl1.EnableTouchMode = True
GridGroupingControl provides the swipe scrolling support in both horizontal and vertical directions.
The GridGroupingControl allows to perform the touch zoom in or out operations to the entire grid by initialize the ZoomGroupingGrid class where the constructor takes a parameter as a
To have this touch zooming support in grid, the GridHelperClasses.Windows assembly needs to be added into the assembly reference.
// Initialize the Zooming to GridGroupingControl ZoomGroupingGrid zoom = new ZoomGroupingGrid(this.gridGroupingControl1);
'Initialize the Zooming to GridGroupingControl Dim zoom As New ZoomGroupingGrid(Me.gridGroupingControl1)
The GridGroupingControl does not allow to perform the touch zoom in or out operations when current cell is in editing mode.
The touch selection support as like Excel can be enabled by setting the
EnableTouchMode property to
true and also the Excel-like selection frame and Excel-like current cell options needs to be enabled to enable the touch selection support.
To enable excel like selection frame in the grid, the ExcelLikeSelectionFrame property can be used. And to have the Excel-Like current cell in the grid, set the ExcelLikeCurrentCell to
//Enable the Excel-like selection frame. this.gridGroupingControl1.TableModel.Options.ExcelLikeSelectionFrame = true; //Enable the Excel-like current cell. this.gridGroupingControl1.TableModel.Options.ExcelLikeCurrentCell = true;
'Enable the Excel-like selection frame. Me.gridGroupingControl1.TableModel.Options.ExcelLikeSelectionFrame = True 'Enable the Excel-like current cell. Me.gridGroupingControl1.TableModel.Options.ExcelLikeCurrentCell = True
GridGroupingControl does not allow to perform the touch selection operation in 2003 Excel like selection frame. And also grid does not allow to perform the touch selection operations when current cell is in editing mode. This can be avoid by setting the ActivateCurrentCellBehavior property to
Disabling the Touch Selection
The touch selection can be disabled by setting the ShowTouchIndicator property to
false. The default value of
ShowTouchIndicator property is
//Disable the touch indicator this.gridGroupingControl1.TableControl.ShowTouchIndicator = false;
'Disable the touch indicator Me.gridGroupingControl1.TableControl.ShowTouchIndicator = False