Click here to Skip to main content
15,910,661 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all!!!! I am working on web application(ASP.Net ,C#).Can any one tell me how can I fix the gridview header vertically but keep it scrollable horizontally.
.
The problem with my approach is that the grid header is fixed horizontally and vertically.If the grid width exceeds the panel width the header overflows horizontally.


Using CSS i am only able to fix the header both vertically and horizontally but what i want is that the header should be scrollable horizontally but fixed only vertically....

Any help will be appreciable......
Posted

Have you tried this?
For freezing Headers vertically:
Step 1: Create a CSS class
.HeaderFreeze  
{  
position:relative ;   
top:expression(this.offsetParent.scrollTop);  
z-index: 10;  
}   

Step 2: Set Gridview’s HeaderStyle CssClass as followsCssClass="HeaderFreeze"
 
Share this answer
 
Here is an article of this implementation :
Maintain GridView Scroll Position and Header Inside Update Panel[^]

;)
 
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