Back to Devexpress

GridBandCollection.Add() Method

windowsforms-devexpress-dot-xtragrid-dot-views-dot-bandedgrid-dot-gridbandcollection.md

latest2.7 KB
Original Source

GridBandCollection.Add() Method

Creates and adds a new band to the end of the collection.

Namespace : DevExpress.XtraGrid.Views.BandedGrid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
public virtual GridBand Add()
vb
Public Overridable Function Add As GridBand

Returns

TypeDescription
GridBand

A GridBand object representing the band added.

|

Remarks

The Add method creates a new band with default settings, adds it to the end of the collection and returns the new band. You can customize the settings of the object returned to provide the band’s desired appearance and functionality. You can also create a band object manually, customize it as needed and then add to the collection using another overload of the Add method.

If you need to add a band to a specific position within the collection, use the GridBandCollection.Insert method. To remove a band from the collection, use the GridBandCollection.Remove method.

See Also

AddRange(GridBand[])

Remove(GridBand)

Insert

CanAdd(GridBand)

GridBandCollection Class

GridBandCollection Members

DevExpress.XtraGrid.Views.BandedGrid Namespace