Reputation: 71
void GridView1_RowCreated(Object sender, GridViewRowEventArgs e) {
if (e.Row.RowType == DataControlRowType.DataRow)
{
(e.Row.FindControl("linkDocs") as HyperLink).Visible = false;
}
}
I can't get that code sample to work. I need to access a hyperlink control on my page.
I have a master page setup.
Upvotes: 0
Views: 377
Reputation: 19365
Make sure you are using a TemplateField containing a Hyperlink with ID="linkDocs".
Maybe the OnRowDataBound Event is better suited for your needs.
Upvotes: 1