AllowGrouping Property

Microsoft Office Web Components Object Model

AllowGrouping Property

       

True if the user is able to group fields on the row axis or the column axis in the specified PivotTable list. If this property is set to False, the grouping buttons are disabled but the user can still group fields programmatically. The default value is True. Read/write Boolean.

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