RaymondC
  • RaymondC
  • Advanced Member Topic Starter
2019-07-24T23:13:07Z
Hello,

The RowChildCount property description: "This property allows you to know how many child rows the specified row has. Only rows of the next hierarchy level (without their sub-nested rows) are counted."

Is there any property that counts ALL child rows INCLUDING sub-nested rows?

Thanks.

Ray
Igor/10Tec
2019-07-25T11:17:23Z
Private Function RowChildCountAll(ByVal plRow As Long) As Long
   Dim btCurRowLevel As Byte
   Dim lRes As Long
   Dim iRow As Long
   
   btCurRowLevel = iGrid1.RowLevel(plRow)
   
   For iRow = plRow + 1 To iGrid1.RowCount
      If iGrid1.RowLevel(iRow) <= btCurRowLevel Then
         Exit For
      Else
         lRes = lRes + 1
      End If
   Next
   
   RowChildCountAll = lRes
End Function

This?
RaymondC
  • RaymondC
  • Advanced Member Topic Starter
2019-07-25T15:44:55Z
Thank you.

I knew I could create a custom function but I first wanted to make sure it didn't already exist.

Thanks again.