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

GridBand.Width Property

Gets or sets band width.

Namespace: DevExpress.XtraGrid.Views.BandedGrid

Assembly: DevExpress.XtraGrid.v24.2.dll

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

#Declaration

[DefaultValue(70)]
[DXCategory("Appearance")]
[XtraSerializableProperty(XtraSerializationFlags.AutoScaleX)]
[XtraSerializablePropertyId(3)]
public virtual int Width { get; set; }

#Property Value

Type Default Description
Int32 70

An integer value specifying band width in pixels.

#Remarks

The Width property cannot be set to values less than that specified by the GridBand.MinWidth property. Note also that bands can contain child bands and columns. Each band and column can also specify its own minimum width using the GridBand.MinWidth and GridColumn.MinWidth properties. Thus, a band cannot be resized to a width that exceeds these constraints.

Note: if the column auto-width mode is activated (the View’s GridOptionsView.ColumnAutoWidth option is enabled), actual band width may not match the Width property value. In this instance, use the GridBand.VisibleWidth property for the actual band’s width.

See Also