I'm having difficulty adding a repeating header row, every x rows, to a gridview. I'm able to add the header only once with the below code. For some reason it will only add it during the last iteration through the for/next statement. I tried manually adding three separate .addat statements to different rows and it only executed the last .addat statement. I couldn't find any information on why it's only working the one time and I hope someone has a fix or better solution.
Thanks in advance!
Code snippet (Note the IsWhole() function verifies that the rownumber divided into a whole number):
Protected Sub Gridview1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles Gridview.DataBound
Dim grid As GridView = TryCast(sender, GridView)
If grid IsNot Nothing Then
Dim row As New GridViewRow(0, -1, DataControlRowType.Header, DataControlRowState.Normal)
Dim header As GridViewRow = POSTURE_RESULT.HeaderRow
For i As Integer = 0 To POSTURE_RESULT.Columns.C
View Complete Post