Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PivotGridControl.BestFit() Method

In This Article

Resizes the columns and rows which correspond to the data and row 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()

#Remarks

The BestFit method resizes the column(s) that correspond to the data fields and row fields, to entirely display their contents. The BestFit method takes into account:

  • a field header’s width;
  • field values;
  • summary values displayed within the columns that correspond to data fields.

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