VWD 2008 Express. Visual Basic.
I am trying to reference controls that are within columns (cells) of a row in a GridView. These columns are template fields. I am trying to access these controls in the RowEditing event procedure of the GridView. My code is as follows (a small example):
Protected Sub RelationshipsGridView_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles RelationshipsGridView.RowEditing
CType(RelationshipsGridView.Rows(e.NewEditIndex).Cells(1).FindControl("CurrentConstitLabel"), Label).Text = "Test"
End Sub
The FindControl returns "nothing."
I am tearing my hair our on this, as it makes no sense. Below is my GridView. The control I am trying to reference and assign above is in red below.
<asp:Gri ...
Go to the complete details ...