Skip to main content

TreeListView.BestFitMaxRowCount Property

Gets or sets the number of records taken into account when calculating the optimal widths required for columns to completely display their contents. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v14.2.dll

#Declaration

[XtraSerializableProperty]
public int BestFitMaxRowCount { get; set; }

#Property Value

Type Description
Int32

An integer value that specifies the number of records processed by a View to apply best fit.

#Remarks

Table and TreeList Views provide the capability to automatically calculate and apply the optimal width required for a column to completely display its contents. To do this, use the TableView.BestFitColumn or TableView.BestFitColumns method. End-users can resize columns to their optimal width (if allowed) by double clicking their right border or using the column header context menu.

By default, a column's optimal width is calculated based on the text of all cells within this column. To increase the application's performance, the number of records taken into account when calculating the optimal width can be limited by setting the BestFitMaxRowCount property. By default, this property is set to NaN, to indicate that all cells are processed. If the BestFitMaxRowCount property is set to a positive value, a View processes the specified number of cells starting from the top visible cell.

To learn more, see Columns Layout and Width.

#Implements

DevExpress.Xpf.Grid.ITableView.BestFitMaxRowCount
See Also