GridOptionsView.ColumnAutoWidth Property

Gets or sets a value specifying whether column widths are automatically modified so that the total columns' width matches the View's width.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[DefaultValue(true)]
[XtraSerializableProperty]
public virtual bool ColumnAutoWidth { get; set; }
<DefaultValue(True)>
<XtraSerializableProperty>
Public Overridable Property ColumnAutoWidth As Boolean

Property Value

Type Default Description
Boolean

true

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

Property Paths

You can access this nested property as listed below:

Object Type Path to ColumnAutoWidth
AdvBandedGridView
.OptionsView.ColumnAutoWidth
AdvBandedGridView
.OptionsView.ColumnAutoWidth
AdvBandedGridView
.OptionsView.ColumnAutoWidth
BandedGridView
.OptionsView.ColumnAutoWidth
BandedGridView
.OptionsView.ColumnAutoWidth
GridView
.OptionsView.ColumnAutoWidth

Remarks

GridView-ColumnAutoWidth

Example:


gridView1.OptionsView.ColumnAutoWidth = false;

If a column's OptionsColumn.FixedWidth option is enabled, the column's width is not changed when applying the auto width feature.

See Columns to learn more.

See Also