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.v19.1.dll
NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Core
Declaration
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).
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the BestFit(XRPivotGridField) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.