What is the best way to format the same row in a given band. For example, I have two bands. Band(1) will always have 3 rows in it.
I want to make the first row always have a background color of AntiqueWhite and the third row always have a yellow background (among other things like making the second row updatable, etc).
I tried the following, but it doesn't work properly, because the 'Not (e.Row.HasNextSibling)' does not eliminate the second row in the second 'if' statement'.
Protected Sub UltraWebGrid1_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebGrid.RowEventArgs) Handles UltraWebGrid1.InitializeRow
If Not (e.Row.HasPrevSibling) And e.Row.Band.Index = 1 Then
e.Row.Style.BackColor = Drawing.Color.AntiqueWhite
e.Row.Style.ForeColor = Drawing.Color.Navy
End If
If Not (e.Row.HasNextSibling) And e.Row.Band.Index = 1 Then
e.Row.Style.BackColor = Drawing.Color.Yellow
End Sub
Thanks!
Chris
I was close. I need to use e.Row.Index = 0 and e.Row.Index = 1 to get those rows.