GridBand.Columns Property

Provides access to columns owned by the band.

Namespace: DevExpress.XtraGrid.Views.BandedGrid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[Browsable(false)]
[XtraSerializableProperty(XtraSerializationVisibility.NameCollection, true, true, true)]
[XtraSerializablePropertyId(3)]
public virtual GridBandColumnCollection Columns { get; }
<Browsable(False)>
<XtraSerializableProperty(XtraSerializationVisibility.NameCollection, True, True, True)>
<XtraSerializablePropertyId(3)>
Public Overridable ReadOnly Property Columns As GridBandColumnCollection

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