Click here to Skip to main content
15,919,028 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to have a fixed header and also a scroller in the grid view.
The header content should be fetched from database.
Dharmendra-18 7-Mar-13 5:07am    
you can use template feature not to use auto generated columns
vinayraghavendra.hs 7-Mar-13 5:07am    
if gridview property AutoGenerateColumns is true it will automatically fetches the header text while binding.

Use the below code in CSS and reference this css in gridview



background-color: #006699;

color: #ffffff;

height: 25px;

top: expression(Sys.UI.DomElement.getBounds(document.getElementById("panelContainer")).y-25);

Share this answer
J.Karthick 7-Mar-13 5:11am    
Can you please explain whats that 'panelContainer' means ?? Is it default ID ??
Please refer:
My answer for similar question: How to make static header in gridview?[^]

Some good links on CP:
Gridview with Fixed Header[^]
Gridview Fixed Headers[^]
Grid View with Fixed Header[^]

Similar discussion:
Fixed GridView Header[^]

CP Search:
Grid with fix Header[^]
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