Back to Devexpress

GridColumn.BestFitItemsCount Property

maui-devexpress-dot-maui-dot-datagrid-dot-gridcolumn-31b37090.md

latest1.8 KB
Original Source

GridColumn.BestFitItemsCount Property

Gets or sets the number of cells used to calculate the best-fit width for the current column. This is a bindable property.

Namespace : DevExpress.Maui.DataGrid

Assembly : DevExpress.Maui.DataGrid.dll

NuGet Package : DevExpress.Maui.DataGrid

Declaration

csharp
public int? BestFitItemsCount { get; set; }

Property Value

TypeDefaultDescription
Nullable<Int32>20

The number of cells used to calculate the best-fit width for the current column.

|

Remarks

If you set the AutoBestFitColumns property to true, the best-fit column width is calculated based on the maximum content width within specified cells. The column width calculation starts from the first top visible cell. Use the GridColumn.BestFitItemsCount property to specify the number of cells used to calculate the best-fit width for the current column.

The GridColumn.BestFitItemsCount property also affects CheckBoxColumn, ImageColumn, and TemplateColumn. The default value for these column types is 1.

For more information, refer to the following section: Grid Column Best-Fit Width.

See Also

GridColumn Class

GridColumn Members

DevExpress.Maui.DataGrid Namespace