Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDataSource
    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ds As UltraDataSource = New UltraDataSource()
        Dim rootBand As UltraDataBand = ds.Band
        rootBand.Columns.Add("Col1", GetType(String))
        Dim col1 As UltraDataColumn = rootBand.Columns("Col1")
        ' Column has a back reference to the band.
        rootBand = col1.Band
        ' You can get the column collection a column belongs to using 
        ' ParentCollection property of the column.
        Dim columnCollection As UltraDataColumnsCollection = col1.ParentCollection
        ' UltraDataColumnsCollection also has a back reference to the band.
        ' Following two lines will give you the same band.
        rootBand = columnCollection.Band
        rootBand = col1.Band
        ds.Rows.Add()
        Dim row As UltraDataRow = ds.Rows(0)
        ' Row has a back reference to the row collection it belongs to.
        Dim rowCollection As UltraDataRowsCollection = row.ParentCollection
        ' Both the UltraDataRow and UltraDataRowsCollection have a back 
        ' reference to the band they belong to. Following two lines will
        ' get the same bands. (A row collection and rows it contains will
        ' pont to the same band).
        rootBand = rowCollection.Band
        rootBand = row.ParentCollection.Band
        ' Row collection also has a back reference to the parent row.
        Dim parentRow As UltraDataRow = rowCollection.ParentRow
        ' You can also get the parent row from a row. Following two
        ' lines do the same.
        parentRow = row.ParentRow
        parentRow = row.ParentCollection.ParentRow
        rootBand.ChildBands.Add("ChildBand")
        Dim childBand As UltraDataBand = rootBand.ChildBands("ChildBand")
        ' Band has a back reference to the bands collection it belongs to.
        Dim bandsCollection As UltraDataBandsCollection = childBand.ParentCollection
        ' Both UltraDataBand and UltraDataBandsCollection have a back reference 
        ' the parent band. Following two lines will give you the same band.
        rootBand = childBand.ParentBand
        rootBand = childBand.ParentCollection.ParentBand
    End Sub