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

TreeListBand.ParentBand Property

Gets the band’s parent.

Namespace: DevExpress.XtraTreeList.Columns

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

[Browsable(false)]
public TreeListBand ParentBand { get; }

#Property Value

Type Description
TreeListBand

An object that specifies the band’s parent.

#Remarks

The ParentBand property returns null (Nothing in Visual Basic) if the current band is at the root hierarchy level or if it is not within the TreeList‘s bands hierarchy.

To display a band within a Tree List control, add the band to the control’s bands hierarchy. This can be accomplish using methods provided by a TreeListBandCollection object ( see the TreeListBandCollection.Add, TreeListBandCollection.AddBand, TreeListBandCollection.Insert and TreeListBandCollection.AddRange methods). The root band collection can be obtained using the TreeList.Bands property. A band’s child band collection is returned by the TreeListBand.Bands property.

To set the desired band parent, add the band to the appropriate collection. The ParentBand property will be updated.

The parent band has effect on its children. For instance, the visibility of child bands/columns depends on the TreeListBand.Visible property’s value of the parent band; changing the band width leads to changing the width of its children, etc.

See Also