Attempting to use the code below to no avail - I cannot seem to locate the checkbox control. Note: the grid does return the expected number of rows. As indicated in the title I am trying to find the checkbox from another user control on the same parent page.
Dim grid As GridView = CType(Me.Parent.FindControl(SearchControlID).FindControl("grdSearchResults"), GridView)
For Each row As GridViewRow In grid.Rows
Dim selectedRow As CheckBox = row.FindControl("chkRequestReference")
If (selectedRow.Checked) Then
rowSelected = True
Exit For
End If
Next
Aucun commentaire:
Enregistrer un commentaire