Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports System.Diagnostics
Private Sub Button62_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button62.Click
' Get the first child row of the first row in the UltraGrid.
Dim childRow As UltraGridRow = Me.ultraGrid1.Rows(0).GetChild(Infragistics.Win.UltraWinGrid.ChildRow.First)
' AllAncestorsExpanded indicate whether all the ancestors of a row are expanded.
' Write out this property's value before calling ExpandAncestors.
Debug.WriteLine("Before calling ExpandAncestors, AllAncestorsExpanded = " & childRow.AllAncestorsExpanded)
' Expand all of its ancestors if the aren't already expanded.
childRow.ExpandAncestors()
' After calling ExpandAncestors, AllAncestorsExpanded should be true (unless ofcourse
' you cancel the BeforeRowExpanded event to prevent expanding rows).
Debug.WriteLine("After calling ExpandAncestors, AllAncestorsExpanded = " & childRow.AllAncestorsExpanded)
End Sub