Back to Devexpress

TreeList.EnableImprovedColumnSizing Property

windowsforms-devexpress-dot-xtratreelist-dot-treelist-e3070cce.md

latest2.6 KB
Original Source

TreeList.EnableImprovedColumnSizing Property

Gets or sets whether the updated column width calculation mechanism is enabled.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
[Browsable(false)]
public bool EnableImprovedColumnSizing { get; set; }
vb
<Browsable(False)>
Public Property EnableImprovedColumnSizing As Boolean

Property Value

TypeDescription
Boolean

true if the updated mechanism is enabled; otherwise, false.

|

Remarks

Use the EnableImprovedColumnSizing property to switch between legacy and updated column width calculation modes:

  • legacy mode - column width changes dynamically depending on TreeList settings and node levels.
  • updated mode - the TreeListColumn.MaxWidth and TreeListColumn.MinWidth settings work as expected, meaning you can set a column to a specific size that will remain unchanged.

The figure below illustrates the difference between these modes. The “Name” column’s width equals 120 , TreeListColumn.MinWidth is 30 , and the TreeListOptionsView.BestFitNodes is set to Visible. When the EnableImprovedColumnSizing setting is off, this “Name” column ignores its width setting and behaves according to the BestFitNodes property: shrinks when collapsed. If the EnableImprovedColumnSizing setting is enabled, column widths are constant in both expanded and collapsed states.

See Also

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace