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

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