.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PivotBehaviorOptions.AutoFitColumns Property

Gets or sets a value indicating whether column widths should be automatically resized when the pivot table is recalculated or refreshed.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v21.1.Core.dll


bool AutoFitColumns { get; set; }

Property Value

Type Description

true, to automatically adjust column widths each time the pivot table is updated; otherwise, false.

The default value is true.

Property Paths

You can access this nested property as listed below:

Object Type Path to AutoFitColumns


By default, when you change your PivotTable report (add, move or remove fields, change the report layout, apply filters etc.) or perform a refresh operation, column widths in the pivot table are automatically resized to fit the cell content. To preserve the column widths so that they don’t change when the pivot table is recalculated or refreshed, set the AutoFitColumns property to false.

See Also