Back to Devexpress

TreeListBand.ParentBand Property

windowsforms-devexpress-dot-xtratreelist-dot-columns-dot-treelistband-3966cbec.md

latest3.3 KB
Original Source

TreeListBand.ParentBand Property

Gets the band’s parent.

Namespace : DevExpress.XtraTreeList.Columns

Assembly : DevExpress.XtraTreeList.v25.2.dll

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

Declaration

csharp
[Browsable(false)]
public TreeListBand ParentBand { get; }
vb
<Browsable(False)>
Public ReadOnly Property ParentBand As TreeListBand

Property Value

TypeDescription
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

RootBand

TreeListBandCollection

TreeList.Bands

TreeListBand.Bands

TreeListBand Class

TreeListBand Members

DevExpress.XtraTreeList.Columns Namespace