Skip to main content

BaseRow.HasChildren Property

Gets a value indicating whether a specific row contains child rows.

Namespace: DevExpress.XtraVerticalGrid.Rows

Assembly: DevExpress.XtraVerticalGrid.v22.2.dll

NuGet Package: DevExpress.Win.VerticalGrid


public virtual bool HasChildren { get; }

Property Value

Type Description

true if a specific row contains one or more child rows; otherwise false.


Use this property to determine whether the current row has child rows. If the row’s BaseRow.ChildRows collection is not empty, the HasChildren property will return true.


The following sample code expands all collapsed parent rows at the root level and collapses expanded ones. The BaseRow.Expanded property is used for this purpose. The collection of root level rows is accessed via the VGridControlBase.Rows property. The BaseRow.HasChildren property is used to determine whether a row is a parent one and can be expanded or collapsed.

The image below displays the look & feel of a grid control before and after execution of the sample code.


foreach (BaseRow currRow in vGridControl1.Rows) {
    // collapsing expanded parent rows or expanding collapsed ones
    if (currRow.HasChildren) currRow.Expanded = !currRow.Expanded;
See Also