PivotGridControl.BestFit() Method
Resizes all columns to fit their contents.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.XtraPivotGrid.v24.2.dll
NuGet Package: DevExpress.Win.PivotGrid
#Declaration
#Remarks
The BestFit method resizes all columns to display the entire contents. Call the method after the Pivot Grid loads the data and calculates its layout.
Important
Do not call the Best
The method applies to the following fields:
- a data field;
- a row field;
- a column field, if the column is not nested (the field is the last (and lowest) in the column field hierarchy and there is only one data field).
Tip
Use the Pivot
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the BestFit() method.
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.