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?
protected void Button1_Click(object sender, EventArgs e)
{
this.gvw1.Columns[0].HeaderText = "The new header";
}
Hope that helps.
3
votes
I think on particular button click it will not change you can only change by writing the required code in gridview RowDataBound event
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more