maqskywalker
asked on
Using FindControl to find TextBox in HeaderTemplate of DataGrid in ASP.NET WebForms
https://stackoverflow.com/questions/615950/how-do-i-access-a-control-in-the-headertemplate-of-my-gridview
In the above link there is this example:
Which uses FindControl to find a TextBox found in the HeaderTemplate of a ASP.NET Web Forms GridView.
Notice how it uses HeaderRow like this: GV1.HeaderRow
I'm working on an old legacy web app which uses the older ASP.NET Web Forms DataGrid
DataGrid does not have HeaderRow.
What's the equivalent to these 2 lines for a DataGrid ?
GridView GV1 = (GridView)FindControl("Lab _1_GV1");
TextBox TXB1 = (TextBox)GV1.HeaderRow.Fin dControl(" Lab_1_TX2G V1");
In the above link there is this example:
Which uses FindControl to find a TextBox found in the HeaderTemplate of a ASP.NET Web Forms GridView.
Notice how it uses HeaderRow like this: GV1.HeaderRow
I'm working on an old legacy web app which uses the older ASP.NET Web Forms DataGrid
DataGrid does not have HeaderRow.
What's the equivalent to these 2 lines for a DataGrid ?
GridView GV1 = (GridView)FindControl("Lab
TextBox TXB1 = (TextBox)GV1.HeaderRow.Fin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.