在固定宽度div中冻结gridview标题 [英] Freezing gridview header in a fixed width div
问题描述
我在网上看到了一些gridview头文件冻结的例子,但是我有一个特殊情况,gridview是固定宽度的div。我试过的例子使标题固定,但是标题的全宽显示出来,它溢出了div,而栅格体有一个水平滚动条。
I需要它:
1-头部和tbody水平滚动,并且都被限制在固定宽度div中。
2-头部固定,而gridview主体垂直滚动。
3-不想使用商业网格。
4-我只使用IE。不要在意FF,Opera,..等等。
我刚刚写了一个jQuery插件,你需要什么。你只需用一个thead和tbody构建一张桌子,剩下的工作就可以完成。使用非常简单......我在下面链接的另一个问题下发布了解决方案。在IE6 / 7/8中也支持。
或直接插入我的插件网站的链接:
http://fixedheadertable.mmalek.com
I have seen some gridview header freezing examples on the web but I have a special case where the gridview is in a fixed width div. The examples I tried make the header fixed but the full width of the header is shown and it overflows out of the div while the grid body has a horizontal scroll bar.
I need it to:
1- Header and tbody scroll together horizontally and both confined in the fixed width div.
2- Header is fixed while gridview body scrolls vertically.
3- Don't want to use a commercial grid.
4- I am using IE only. Don't care if it works in FF, Opera, ..etc.
I just wrote a jQuery plugin that does exactly what you need. You just build 1 table with a thead and tbody and it does the rest for you. Very simple to use...i posted the solution under another question linked below. Supported in IE6/7/8 too.
Frozen table header inside scrollable div
or a link straight to my plugin site:
http://fixedheadertable.mmalek.com
这篇关于在固定宽度div中冻结gridview标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!