首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

关于GridView固定表头的有关问题,(只有这么多分了抱赚)

2012-01-10 
关于GridView固定表头的问题,在线等...(只有这么多分了抱赚)style.Freezing{position:relativetable-la

关于GridView固定表头的问题,在线等...(只有这么多分了抱赚)
<style>
.Freezing
      {
     
      position:relative   ;
      table-layout:fixed;
      top:expression(this.offsetParent.scrollTop);    
      z-index:   10;
      }

.Freezing   th{text-overflow:ellipsis;overflow:hidden;white-space:   nowrap;padding:2px;}
</style>

从网上找到以上代码.(我的方法是Gridview放在了一个panel里以实现滚动条的效果),表头是固定了,但是有漏光的问题,就是拉动滚动条的时候,表头上面有一个缝,会漏出行的内容来,郁闷...

请高手解答..

[解决办法]
top:expression(this.offsetParent.scrollTop);
这个改成
top:expression(this.offsetParent.scrollTop+1);
或者
top:expression(this.offsetParent.scrollTop-1);
试试
[解决办法]
http://www.aspx-net.com/e/ASPNET/ASPNETArticle/108.aspx

热点排行