Back to Devexpress

PivotGridControl.BestFit(PivotGridField) Method

wpf-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridcontrol-dot-bestfit-x28-devexpress-dot-xpf-dot-pivotgrid-dot-pivotgridfield-x29.md

latest2.1 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Wpf.PivotGrid

Declaration

csharp
public void BestFit(
    PivotGridField field
)
vb
Public Sub BestFit(
    field As PivotGridField
)

Parameters

NameTypeDescription
fieldPivotGridField

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

BestFitArea

PivotGridControl Class

PivotGridControl Members

DevExpress.Xpf.PivotGrid Namespace