Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeListColumn.Width Property

Gets or sets the column width in pixels.

Namespace: DevExpress.XtraTreeList.Columns

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

[DefaultValue(75)]
[XtraSerializableProperty(XtraSerializationFlags.AutoScaleX)]
[XtraSerializablePropertyId(3)]
public int Width { get; set; }

#Property Value

Type Default Description
Int32 75

An integer value representing the column width in pixels.

#Remarks

Use the Width property to adjust the column width. Note, however, that there can be situations when the value returned by this property doesn’t represent the actual column width. This takes place when enabling the TreeListOptionsView.AutoWidth option. In this case, columns are proportionaly resized to fit the width of the control. In fact, the TreeListColumn.Width properties of columns remain the same. The actual width of a column can be accessed via the TreeListColumn.VisibleWidth property in this case.

The actual value that you can set using the Width property is limited by the TreeListColumn.MaxWidth and TreeListColumn.MinWidth property values.

See Also