PivotGridControl.BestFit(PivotGridField) Method
Resizes the column(s) related to the specified field to fit the longest text currently displayed in the column.
Namespace: DevExpress.XtraPivotGrid
Assembly: DevExpress.XtraPivotGrid.v24.2.dll
NuGet Package: DevExpress.Win.PivotGrid
#Declaration
public void BestFit(
PivotGridField field
)
#Parameters
Name | Type | Description |
---|---|---|
field | Pivot |
A Pivot |
#Remarks
The BestFit method resizes the columns related to the current field to display the entire field 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