Click here to Skip to main content
15,891,976 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How do i make gridview header editable mode? here i have to edit header in editable mode and don't want to take textbox inside gridview for update grid header.
Posted

You would have to make a custom control inherited from the ListView. Add a property that is "Edit Mode (For Headers)" as a bool. If it is on, then add a textbox or something transparent over the top. When the text is changed, the header will change its text, and the box will hide.
-iProgramIt
 
Share this answer
 
Agree with Solution #1.
Apart from that you can set the header text from code behind like this:
myGridView.HeaderRow.Cells[index].Text = "New Header Text";

-KR
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900