Touch Support in Windows Forms Pivot Grid

21 Jan 20252 minutes to read

PivotGrid control provides touch support for scrolling, panning and bubble selection while selecting cells.

Enabling touch mode

The touch support in pivot grid can be enabled using the EnableTouchMode property of pivot grid. By default, the EnableTouchMode property is set as false.

Refer to the below code sample to enable the touch mode in pivot grid.

this.pivotGridControl1.EnableTouchMode = true;
Me.pivotGridControl1.EnableTouchMode = True

Touch gestures

Enabling the touch mode in pivot grid control allows to expand or collapse the header cells. It also allows to drag and drop the pivot items between the pivot table field list and the grouping bar.

Touch swiping

When the touch mode is enabled, the pivot grid control allows to scroll its tabular values by swiping the control in both horizontal and vertical directions.

Touch-Support_img1

Touch selection

The pivot grid control provides support to select multiple cells with the help of touch indicator.

Enabling Excel like touch selection

To enable Excel like touch selection, the AllowSelection, ExcelLikeSelectionFrame and ExcelLikeCurrentCell properties need to be assigned as illustrated in the below code sample.

this.pivotGridControl1.EnableTouchMode = true;Syncfusion.Windows.Forms.Grid.GridSelectionFlags.Any;
this.pivotGridControl1.TableModel.Options.ExcelLikeSelectionFrame = true;
this.pivotGridControl1.TableModel.Options.ExcelLikeCurrentCell = true;
Me.pivotGridControl1.EnableTouchMode = True
this.pivotGridControl1.TableModel.Options.AllowSelection = Syncfusion.Windows.Forms.Grid.GridSelectionFlags.Any;
Me.pivotGridControl1.TableModel.Options.ExcelLikeSelectionFrame = True
Me.pivotGridControl1.TableModel.Options.ExcelLikeCurrentCell = True

Touch-Support_img2

NOTE

When Excel 2003 selection frame is enabled, then the touch selection cannot be performed in the pivot grid control.

Disabling touch indicator

The touch indicator used for cell selection can be hidden in the pivot grid control by using the ShowTouchIndicator property. By default, its value is set as true.

this.pivotGridControl1.TableControl.ShowTouchIndicator = false;
Me.pivotGridControl1.TableControl.ShowTouchIndicator = False

Touch-Support_img3