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.v24.1.dll
NuGet Package: DevExpress.Wpf.Grid.Core
Declaration
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 and Bands.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the AutoWidth property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.