Skip to main content

TreeListBand.ParentBand Property

Gets the band’s parent.

Namespace: DevExpress.XtraTreeList.Columns

Assembly: DevExpress.XtraTreeList.v23.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