Skip to main content
A newer version of this page is available. .

GridBand.Columns Property

Provides access to columns owned by the band.

Namespace: DevExpress.XtraGrid.Views.BandedGrid

Assembly: DevExpress.XtraGrid.v19.1.dll

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.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Columns property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also