Skip to main content

PivotGridControl.BestFitDataHeaders(Boolean) Method

Resizes the Data Header Area to the minimum width required to display data field headers.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.XtraPivotGrid.v24.1.dll

NuGet Package: DevExpress.Win.PivotGrid

Declaration

public void BestFitDataHeaders(
    bool considerRowArea
)

Parameters

Name Type Description
considerRowArea Boolean

true, to prevent the Row Header Area width from being decreased; otherwise, false.

Remarks

The BestFitDataHeaders method resizes the Data Header Area to the minimum width required to display data field headers.

The BestFitDataHeaders method decreases the width of the Data Header Area if it exceeds the total width of the contained columns. As a result, the width of the Row Header Area, displayed below the Data Header Area, is also decreased and the text may be trimmed. Set the considerRowArea parameter to true to not decrease the Row Header Area width.

To resize all columns to the minimum width required to display the column’s contents, call the PivotGridControl.BestFit method. Use the PivotGridControl.BestFitColumnArea and PivotGridControl.BestFitRowArea methods to resize columns only in the respective areas.

The following code snippets (auto-collected from DevExpress Examples) contain references to the BestFitDataHeaders(Boolean) 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.

See Also