AllowGrouping Property

Microsoft Office Web Components Visual Basic

expression.AllowGrouping

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

When this property is set to False, pivoting is disabled. This means that membership in the row and column areas is fixed; you cannot drag a field to or from these areas. All commands related to grouping are disabled, including the following commands:

  • Move to Column Area
  • Move to Detail, if the selection is a field in the row or column area
  • Move to Filtering
  • Move to Row Area

If False, the report layout is frozen, but the user can still filter the data.

Example

This example disables field grouping for the PivotTable list.

PivotTable1.AllowGrouping = False