日期:2014-05-19  浏览次数:20561 次

关于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