Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need to fix header of the grid view... i tried css file

CSS
.header
{
position:absolute;
}


and added the css file to all my columns of gridview header style... but once i execute all d column header merge and overlap eachother and displays only last column name in the first column .. bt d header is fixed and wen i scroll it rolls dwn... plz help me hw to sort this prblm
Posted
Updated 4-Jul-13 21:09pm
v2
Comments
Dholakiya Ankit 18-Jul-13 23:44pm    
give positoion should be relative if you want to fix

 
Share this answer
 
Comments
s_rao88 5-Jul-13 3:20am    
sir i dnt need links.. plz giv eme solution.. say me wer im doin wrng ...
Naz_Firdouse 5-Jul-13 3:27am    
did u set CssClass="header" for your HeaderStyle?
s_rao88 5-Jul-13 5:20am    
yeah i did tht
Naz_Firdouse 5-Jul-13 5:22am    
can you post your design code?
maybe you can try my solution, i worte a jquery plug-in can be fixed header and freeze column.

It is working on:
Internet Explorer 7, 8 (IE 9 Compatibility)
Internet Explorer 9 (9.0.8112)
Internet Explorer 10 on Windows 7 Preview
Google Chrome(23.0.1271.64 m)
Mozilla Firefox (16.0.2)
Apple Safari (5.1.7)

GridViewScroll with jQuery
 
Share this answer
 
To make header fixed using
C#
.header
{
position:absolute;
}


you need to fix the width of header columns and item columns otherwise it will show in disorder manner.
 
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