Skip to main content

TreeListBandCollection.Add(TreeListBand) Method

Adds the specified band to the end of the band collection.

Namespace: DevExpress.XtraTreeList.Columns

Assembly: DevExpress.XtraTreeList.v24.1.dll

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

Declaration

public TreeListBand Add(
    TreeListBand band
)

Parameters

Name Type Description
band TreeListBand

An object that specifies the band to be added.

Returns

Type Description
TreeListBand

An object specifying the new band.

Remarks

The Add method adds the specified band to the end of the collection. You can also call another overload of the Add method that creates a band with default settings.

The TreeListBandCollection.AddBand method allows you to create a new band with the specified caption and append it to the collection. To add a band to a specific position within the collection, utilize the TreeListBandCollection.Insert method.

In addition, you can add several bands (an array of bands) to the collection using the TreeListBandCollection.AddRange method.

Bands cannot be added to the band collection in the following cases:

  • the band is the collection’s parent;
  • the collection already contains the specified band;
  • the collection’s owner is a child of the specified band (at any nesting level).
See Also