Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeListBandCollection.SetBandIndex(Int32, TreeListBand) Method

Changes the specified band’s position within the collection.

Namespace: DevExpress.XtraTreeList.Columns

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

public virtual void SetBandIndex(
    int newIndex,
    TreeListBand band
)

#Parameters

Name Type Description
newIndex Int32

A new band position within the collection.

band TreeListBand

An object that specifies the band to be moved.

#Remarks

The SetBandIndex method moves the specified band to a new position within the collection and updates the indexes of other bands.

If the specified index is less than zero, the target band is moved to the first position within the collection. If the target index is greater than or equal to the number of elements in the collection, the specified band is moved to the end of the collection.

The SetBandIndex method is not in effect if the current collection does not contain the specified band.

See Also