Back to Devexpress

PivotGridControl.BestFit(Boolean, Boolean) Method

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

latest2.8 KB
Original Source

PivotGridControl.BestFit(Boolean, Boolean) Method

Resizes the columns and rows which correspond to the data fields and row fields, to the minimum width or 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(
    bool fitWidth,
    bool fitHeight
)
vb
Public Sub BestFit(
    fitWidth As Boolean,
    fitHeight As Boolean
)

Parameters

NameTypeDescription
fitWidthBoolean

true to best fit the column’s width (for column fields), or the width of the field values column (for row fields); otherwise, false.

| | fitHeight | Boolean |

true to best fit the row’s height (for row fields), or the height of the field values row (for column fields); otherwise, false.

|

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

BestFitMode

BestFitColumn(Int32)

BestFitRow(Int32)

PivotGridControl Class

PivotGridControl Members

DevExpress.Xpf.PivotGrid Namespace