Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42220

GridView Footer

$
0
0
I have a gridview (GV) that has a footer row. The GV only loads once on the page load event and it's read only. I have computed my value and want to place it in the footer via this code in the GV RowDataBound event:

Code:

If e.Row.RowType = DataControlRowType.Footer Then
            e.Row.Cells(1).Text = "Totals:"
            e.Row.Cells(2).Text = "5"
            e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Right
            e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
            e.Row.Font.Bold = True
        End If

When I debug, the RowType <> DataControlRowType.Footer and my code is bypassed. Any suggestions?

Viewing all articles
Browse latest Browse all 42220

Trending Articles