TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mata
NA
46
34.7k
Reference dynamically added controls in HeaderRow gridview
Dec 5 2011 9:30 AM
I want to add textbox to headerRow of first column in Gridview and than reference it in button click event. Unfortunatly this doesn't work, any suggestions. Thank you in advance
protected void gridView_RowCreated(object sender, GridViewRowEventArgs e)
{
TextBox tx10=new TextBox();
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Cells[0].Controls.Add(tx10);
}
}
protected void btFilter_Click(object sender, EventArgs e)
{
TextBox tbx = (TextBox)gridView.HeaderRow.FindControl("tx10");
}
Reply
Answers (
1
)
Code Error
Caching Concept