Hierarchy - closing all child rows that are open

Posted by: doron on 8 September 2017, 12:37 pm EST

  • Posted 8 September 2017, 12:37 pm EST

    Hi  i am using the Hierarchy feature in my spread


    is there a way that after i have opened  many child rows


    to close all rows with out  closing them row after row


    ( is there some way i can close all open child row in using code  )


    ???? any idea


    thanks


    doron


     

  • Replied 8 September 2017, 12:37 pm EST

    doron -

    You can loop through the parent rows and check to see if they are expanded and if so you can close them...

    Dim i As Integer
    Dim b As Boolean
    For i = 0 To FpSpread1.ActiveSheet.RowCount - 1
    b = FpSpread1.ActiveSheet.IsRowExpanded(i)
    If b Then
    FpSpread1.ActiveSheet.ExpandRow(i, False)
    End If
    Next
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels