Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Hi, I am using an ASP GridView. I declare one label in HeaderTemplate for setting heading of a particular column. How can I dynamically change the header text on a particular button click?
GridView
HeaderTemplate
If I understood right, this is what you need,
protected void Button1_Click(object sender, EventArgs e) { this.gvw1.Columns[0].HeaderText = "The new header"; }
Hope that helps.
Add a comment
I think on particular button click it will not change you can only change by writing the required code in gridview RowDataBound event
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.