Back to Devexpress

TreeListBandCollection.Add(TreeListBand) Method

windowsforms-devexpress-dot-xtratreelist-dot-columns-dot-treelistbandcollection-dot-add-x28-devexpress-dot-xtratreelist-dot-columns-dot-treelistband-x29.md

latest3.3 KB
Original Source

TreeListBandCollection.Add(TreeListBand) Method

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

Namespace : DevExpress.XtraTreeList.Columns

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
public TreeListBand Add(
    TreeListBand band
)
vb
Public Function Add(
    band As TreeListBand
) As TreeListBand

Parameters

NameTypeDescription
bandTreeListBand

An object that specifies the band to be added.

|

Returns

TypeDescription
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

AddBand(String)

AddRange(TreeListBand[])

Insert(Int32, TreeListBand)

Remove(TreeListBand)

TreeListBandCollection Class

TreeListBandCollection Members

DevExpress.XtraTreeList.Columns Namespace