Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
looping through child bands
posted

I have this code in a Beforeselect changed event - and it works fine for the parent rows, but how do I access the child bands?

 

Dim rowSelected As UltraGridRow

' loop through all parent band(0) rows

For Each rowSelected In Me.UltraGrid1.Rows

Dim irow As Integer = rowSelected.Band.Index

If rowSelected.Activated = True Then

          rowSelected.Activated = False

          rowSelected.Appearance.BackColor = Color.White

End If

 

 THIS GIVES AN ERROR - WANTS A 'NEW'   KEYWORD.....

Dim band As UltraGridBand = Me.UltraGrid1.DisplayLayout.Bands(1)

For Each band In Me.UltraGrid1.Rows.ParentRow.ChildBands

Select Case band.Index

Case 1

Case 2

End Select

Next

 

 

Next