Forum Moderators: open
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
' Check Value
If DataBinder.Eval(e.Row.DataItem, "USER") = "Bob" Then
Dim lbl As Label = e.Row.FindControl("lbl")
If Not lbl Is Nothing Then
lbl.Text = "blah blah"
End If
End If
End If
End Sub
OK, the code above seems to be OK for a Gridview, but what about a datalist? This part gets an error -->
Handles GridView1.RowDataBound
Particularly the "RowDataBound" word.