GridOptionsView.BestFitMaxRowCount Property
Gets or sets the number of data rows whose content is processed to apply best fit to columns.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v24.1.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
Declaration
[DefaultValue(-1)]
[XtraSerializableProperty]
public virtual int BestFitMaxRowCount { get; set; }
Property Value
Type | Default | Description |
---|---|---|
Int32 | -1 | An integer value specifying the number of data rows that are processed to apply best fit to columns. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to BestFitMaxRowCount |
---|---|
GridView |
|
Remarks
When applying the best fit feature to a column, the column is resized so that it displays the complete contents of its header, footer cell and data cells. The number of data rows taken into account for this calculation is specified by the BestFitMaxRowCount property. If set to -1, all rows are processed. If set to a positive integer, the View processes the specified number of rows starting from the top visible row. Finally, setting the property to 0 forces the View to ignore data cell content when applying the best width feature. In this case, columns are resized to fit the contents of their header and footer cells only.
You can apply the best fit feature to columns using the GridView.BestFitColumns or GridColumn.BestFit methods. Please refer to their descriptions for details. End-users can also use the best fit feature via the column header context menu.