Skip to main content

TreeListView.CalcColumnBestFitWidth(BaseColumn) Method

Returns the column’s optimal (minimum) width required to display its contents completely.

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public double CalcColumnBestFitWidth(
    BaseColumn column
)

Parameters

Name Type Description
column BaseColumn

A TreeListColumn object that is the treelist column.

Returns

Type Description
Double

A Double value that specifies the column’s optimal (minimum) width required to display its contents completely.

Remarks

If the column’s BaseColumn.FixedWidth option is set to true, the CalcColumnBestFitWidth method returns the column width specified by its BaseColumn.Width property.

Note

The CalcColumnBestFitWidth method should only be called when the treelist is loaded.

To learn more, see Best Fit in Columns Layout and Width.

See Also