How to change GridView HeaderText? I have been looking for this solution for days. Finally, I got the answer. Yeah… ![]()
Here is the code…
GridView01.Columns[0].HeaderText = “HeaderName”;
This will change the GridView’s first column to “HeaderName”.
Tags: ASP.NET, GridView, HeaderText
thanks. finally i get the idea. but i changed the code a bit to makes it works with my gridview.
gvprogdetail.HeaderRow.Cells[3].Text = “Header name”;
i only want changes at header row, of cells no.3
thanks… it worked for me
It solved my problem, Thanks
Hi,Thanks It Solved My Problem ,Too.Thank You So Much
FYI. With your code, you cannot sort your header anymore. I tried that before.
yup its. true. i only want to insert ddlist on the item. so no need to sort..
Good then.
thanks for your answer.
it’s what I am finding
@zhangli: You are most welcome.
Sie, It is very nice and useful for the beginners like me.
Thanks
Do it simple like
GridView1.HeaderRow.Cells[10].Text=”New Text”;
This method work for me.
thanks this works for me too
hi friend it’s very use full tips. and i find out how can we do that it in grid view header template.
((Label)GridView1.HeaderRow.FindControl(“your contrl id”)).Text = “”;
Thanks , a lot , it solved my problem
i am change the grid view header text in grid view