Skip to main content

TreeListView.AutoWidth Property

Gets or sets whether column widths are automatically changed so that the total columns' width matches the grid's width. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

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

#Declaration

[XtraSerializableProperty]
public bool AutoWidth { get; set; }

#Property Value

Type Description
Boolean

true to enable the column auto width feature; otherwise, false. The default is false.

#Remarks

Column widths can be changed automatically, so that the total columns' width matches the grid's width. In this instance, changing the width of one column automatically changes the widths of other columns. This behavior is controlled by the view's AutoWidth property. To obtain the actual width of columns, use their BaseColumn.ActualWidth property.

If the automatic column width calculation is disabled, a column's width is specified by its BaseColumn.Width property. If the total columns' width exceeds the grid's width, a horizontal scrollbar is displayed, allowing an end-user to scroll grid columns. If you want a column (or columns) to always be displayed onscreen, regardless of scrolling, set its BaseColumn.Fixed property.

To learn more, see Columns Layout and Width and Fixed Columns.

#Implements

DevExpress.Xpf.Grid.ITableView.AutoWidth
See Also