如何使gridview标头垂直固定但水平滚动??? [英] How to make gridview header fixed vertically but scrollable horizontally????
问题描述
大家好!!!我正在开发Web应用程序(ASP.Net,C#).有人可以告诉我如何垂直固定gridview标头,但如何使其水平滚动.
.
我的方法的问题是网格标题是水平和垂直固定的,如果栅格宽度超过面板宽度,则标题会水平溢出.
使用CSS我只能垂直和水平固定标头,但我想要的是标头应可水平滚动,但只能垂直固定....
任何帮助都将是可观的……
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......
推荐答案
您尝试过吗?
垂直冻结标题:
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"
此处是该实现的文章:
在更新面板内部维护GridView滚动位置和标题 [
Here is an article of this implementation :
Maintain GridView Scroll Position and Header Inside Update Panel[^]
;)
这篇关于如何使gridview标头垂直固定但水平滚动???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!