OptionsColumn.FixedWidth Property

Gets or sets whether this column keeps a constant width when a Grid changes its size or Best Fit operations are called. End-users are still allowed to resize this column.

Namespace: DevExpress.XtraGrid.Columns

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[DefaultValue(false)]
[XtraSerializableProperty]
public bool FixedWidth { get; set; }
<DefaultValue(False)>
<XtraSerializableProperty>
Public Property FixedWidth As Boolean

Property Value

Type Default Description
Boolean

false

true, if the column keeps its width; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to FixedWidth
GridColumn
.OptionsColumn.FixedWidth
LayoutViewColumn
.OptionsColumn.FixedWidth
BandedGridColumn
.OptionsColumn.FixedWidth

Remarks

The code below illustrates how to lock the "Product Name" column's width.

colProductName.OptionsColumn.FixedWidth = true;

If there is a Band that contains only one column, and you want to lock this column's width, enable the Band OptionsBand.FixedWidth property instead.

Users are free to resize any Grid columns at runtime, including columns with fixed widths. To lock or limit column widths at runtime, use of the following approaches:

See Columns to learn more.

See Also