PivotGridControl.BestFitMode Property
Gets or sets how the optimal width required for a column (or row) to completely display its contents is calculated.
Namespace: DevExpress.Xpf.PivotGrid
Assembly: DevExpress.Xpf.PivotGrid.v19.2.dll
Declaration
Property Value
Type | Description |
---|---|
BestFitMode | A BestFitMode enumeration value. |
Available values:
Name | Description |
---|---|
Default | If this mode is assigned to the ColumnBase.BestFitMode of a grid column, this means that it obtains its value from the TableView.BestFitMode property of the owner view. |
AllRows | The column width is calculated based on text of all cells within this column. |
VisibleRows | The column width is calculated based on the values in the currently visible cells. |
DistinctValues | The column width is calculated based on all distinct values in the underlying datasource. |
Smart | In this mode, the column width is calculated as BestFitMode.AllRows if the total count of rows is less than 3,000, and as BestFitMode.DistinctValues if the total count of rows is greater than or equal to 3,000. Also, if the Smart mode is enabled, the TableView.CustomBestFit is raised, thus allowing you to manually calculate the column width. |
Remarks
To learn more, see Best Fit.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the BestFitMode property.
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.