Skip to main content

XRPivotGrid.BestFit(XRPivotGridField) Method

Resizes the columns which correspond to the specified field to the minimum width required to completely display the column’s contents.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.1.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

public void BestFit(
    XRPivotGridField field
)

Parameters

Name Type Description
field XRPivotGridField

An XRPivotGridField object which identifies the columns to which the best width feature should be applied.

Remarks

This method can be applied to a data field or row field. It resizes the column(s) that correspond to the specified field, so that the column’s contents are displayed completely. The BestFit method takes this into account:

  • the field’s caption specified by the PivotGridFieldBase.Caption property;
  • field values of the field;
  • summary values displayed within the column(s) that correspond to the specified field (only for data fields).
See Also