GridOptionsView.BestFitMode Property
Gets or sets whether column best-fit resizing operations should prioritize precision or speed.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v24.1.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
Declaration
[DefaultValue(GridBestFitMode.Default)]
[XtraSerializableProperty]
public virtual GridBestFitMode BestFitMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
DevExpress.XtraGrid.Views.Grid.GridBestFitMode | Default | A DevExpress.XtraGrid.Views.Grid.GridBestFitMode object that specifies whether column best-fit resizing operations should prioritize precision or speed. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to BestFitMode |
---|---|
GridView |
|
Remarks
To ensure all grid columns have sufficient width to display their cell content, call the GridView.BestFitColumns method. To do the same for one specific column, call the GridColumn.BestFit method instead. The BestFitMode property switches the mode in which these best-fit operations perform their calculations.
Full
In this mode, best fit calculations consider character widths, in-place editor settings and events. Such calculations may require more time but guarantee the most accurate results.
Fast
In this mode, the View checks only the number of characters within each cell. This is a less time-consuming calculation mode, at a cost of calculation precision.
Default
The Full mode is the default one if any of the following statements is true:
- the WindowsFormsSettings.DefaultSettingsCompatibilityMode property equals v16;
- Data Grid operates in the Large Data Sources: Server and Instant Feedback Modes;
- there are less than 300 data rows in total;
- you utilize the GridOptionsView.BestFitMaxRowCount property to limit the number of rows used to calculate the optimal column width;
- the GridView.CustomRowCellEdit event is handled.
Otherwise, the default mode is Fast.