Skip to main content

PivotGridControl.BestFit(PivotGridField) Method

Resizes the columns and rows which correspond to the specified fields, to the minimum width and height required to completely display their contents.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v24.2.dll

NuGet Package: DevExpress.Wpf.PivotGrid

Declaration

public void BestFit(
    PivotGridField field
)

Parameters

Name Type Description
field PivotGridField

A PivotGridField object that represents the pivot grid field.

Remarks

When the PivotGridControl.RowTotalsLocation property is set to FieldRowTotalsLocation.Tree, calling the BestFit method for row fields has no effect. In this instance, to apply best fit to row fields, use another overload of this method, which takes the area parameter, and pass the FieldArea.RowArea value as this parameter.

Note

The Best Fit is available only after the Pivot Grid Control has been loaded in the visual tree.

To learn more, see Best Fit.

See Also