TreeListBand.ParentBand Property

Gets the band’s parent.

Namespace: DevExpress.XtraTreeList.Columns

Assembly: DevExpress.XtraTreeList.v21.2.dll


public TreeListBand ParentBand { get; }

Property Value

Type Description

An object that specifies the band’s parent.


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