TreeListBandCollection.Insert(Int32, TreeListBand) Method

Inserts the specified band to the specified position within the band collection.

Namespace: DevExpress.XtraTreeList.Columns

Assembly: DevExpress.XtraTreeList.v20.1.dll

Declaration

public void Insert(
    int position,
    TreeListBand band
)
Public Sub Insert(
    position As Integer,
    band As TreeListBand
)

Parameters

Name Type Description
position Int32

The zero-based index at which the specified band should be inserted.

band TreeListBand

An TreeListBand object to be inserted.

Remarks

If the specified index is less than zero or is greater than or equal to the number of elements in the collection, an exception is raised.

You can also use the TreeListBandCollection.Add and TreeListBandCollection.AddBand methods to append individual bands, or the TreeListBandCollection.AddRange method to add several bands to the collection.

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