TableView.BestFitMode Property
Gets or sets how to calculate the optimal width (best fit) required for a column to completely display its contents. This is a dependency property.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v24.2.dll
NuGet Package: DevExpress.Wpf.Grid.Core
#Declaration
public BestFitMode BestFitMode { get; set; }
#Property Value
Type | Description |
---|---|
Best |
A mode that specifies how to calculate the optimal width required for a column to completely display its contents. |
Available values:
Name | Description |
---|---|
Default | If this mode is assigned to the Column |
All |
The column width is calculated based on text of all cells within this column. |
Visible |
The column width is calculated based on the values in the currently visible cells. |
Distinct |
The column width is calculated based on all distinct values in the underlying datasource. |
Smart | In this mode, the column width is calculated as Best |
#Remarks
For more information on how to resize grid columns, refer to the following help topic: Move and Resize Columns.