Skip to main content

GridBand.Columns Property

Provides access to columns owned by the band.

Namespace: DevExpress.XtraGrid.Views.BandedGrid

Assembly: DevExpress.XtraGrid.v23.2.dll

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

Declaration

[Browsable(false)]
[XtraSerializableProperty(XtraSerializationVisibility.NameCollection, true, true, true)]
[XtraSerializablePropertyId(3)]
public virtual GridBandColumnCollection Columns { get; }

Property Value

Type Description
GridBandColumnCollection

A GridBandColumnCollection object representing the band’s column collection.

Remarks

Only bands located at the bottom of the bands hierarchy can have child columns. In other words, the Columns property of a band owning other bands returns an empty collection.

Use the Columns property to manage columns owned by a band. The GridBandColumnCollection object returned by this property enables you to add, delete and access individual columns. You can use the collection’s GridBandColumnCollection.Add or GridBandColumnCollection.Insert methods to add a column to the band (the column is first removed from its previous band and then added to the current one). The GridBandColumnCollection.Remove method can be used to remove the column from its current parent band. The column becomes invisible as a result.

Note: in Banded Grid Views, the column visual order within the parent band depends on the columns order within the Columns collection. Thus, you should move columns using the collection’s GridBandColumnCollection.MoveTo method to rearrange columns within the View.

See Also