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.v24.1.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Property Value
Type | Description |
---|---|
Boolean | 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 |
---|---|
PivotTable |
|
Remarks
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.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the AutoFitColumns property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.