I have a gridview (gridview2) with a template that contains another gridview (gridview3). I am trying to highlight the last row of gridview3. I used findcontrol but believe I am doing something wrong.
Code:
Protected Sub GridView3_PreRender(ByVal sender As Object, ByVal e As System.EventArgs)
Dim irow As Integer
Dim x As GridView
x = GridView2.FindControl("GridView3")
irow = x.Rows.Count - 1
If irow > 1 Then
x.Rows(irow).BackColor = Drawing.Color.Cornsilk
End If
End Sub