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
1910
How to create more than one multi-column header
posted

I know how to create one multi-column header, but I cannot figure out how to create a 2nd multi-column header. I don't mean a 2nd row. I mean a 2nd multi-column header on the same row as the 1st multi-column header. The code I have that creates the 1st one is:

Dim colHead As Infragistics.WebUI.UltraWebGrid.ColumnHeader
Dim i As Integer
For i = 0 To
e.Layout.Bands(0).HeaderLayout.Count - 1
colHead = e.Layout.Bands(0).HeaderLayout(i)
colHead.RowLayoutColumnInfo.OriginY = 1
Next

' The boolean parameter inserts this header into viewstate, so that the grid will maintain it over a postback if it is not recreated.

Dim ch As New Infragistics.WebUI.UltraWebGrid.ColumnHeader(True)

' The caption to include for the unbound column
ch.Caption = "Par Favorable"
' Set the origin of the element. This will set it up on the first column of the header layout.
ch.RowLayoutColumnInfo.OriginX = 5
' This will set it on the first row of the HeaderLayout object. The columns created by the control are all on the zeroth row by default.
ch.RowLayoutColumnInfo.OriginY = 0
' Add the newly created Header object to the HeaderLayout object
e.Layout.Bands(0).HeaderLayout.Add(ch)
' Expand the new column header to cover all columns.
ch.RowLayoutColumnInfo.SpanX = 3
'End of adding a column header that spans across all columns