Touch Support in Windows Forms Grid Control
GridControl provides the swipe scrolling, panning, zooming and touch selection (bubble selection) touch support. 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.gridControl1.EnableTouchMode = true;
'Enable the touch mode Me.gridControl1.EnableTouchMode = True
GridControl provides the swipe scrolling support in both horizontal and vertical directions.
GridControl allows to perform the touch zoom in or out to the entire grid by initializing ZoomGrid 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 GridControl ZoomGrid zoomGrid = new ZoomGrid(this.gridControl1);
'Initialize the Zooming to GridControl Dim zoomGrid As New ZoomGrid(Me.gridControl1)
The GridControl 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 property to
//Enable the Excel like selection frame to the GridControl this.gridControl1.ExcelLikeSelectionFrame = true; //Enable Excel like current cell in Grid this.gridControl1.ExcelLikeCurrentCell = true;
'Enable the Excel like selection frame to the GridControl Me.gridControl1.ExcelLikeSelectionFrame = True 'Enable Excel like current cell in Grid Me.gridControl1.ExcelLikeCurrentCell = True
The GridControl 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.gridControl1.ShowTouchIndicator = false;
'Disable the touch indicator Me.gridControl1.ShowTouchIndicator = False