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

.GridView表头固定 GridView在iframe里面解决方案

2012-01-11 
.GridView表头固定 GridView在iframe里面用的是webipstin的方法style .Freezing{TABLE-LAYOUT:fixedZ-I

.GridView表头固定 GridView在iframe里面
用的是webipstin的方法

  <style     > .Freezing     {    
                      TABLE-LAYOUT:     fixed;     Z-INDEX:     10;     POSITION:     relative;     ;     TOP:     expression(this.offsetParent.scrollTop)    
}    
.Freezing     TH     {    
                      PADDING-RIGHT:     2px;     PADDING-LEFT:     2px;     PADDING-BOTTOM:     2px;     OVERFLOW:     hidden;     PADDING-TOP:     2px;     WHITE-SPACE:     nowrap    
}    
                                                  </style     >    


    <asp:GridView     BorderStyle= "none "   ID= "GridViewList1 "     runat= "server "   >
          <HeaderStyle   CssClass= "Freezing "   />
                </asp:GridView>


这样把GridView放在某一单独页面是没有问题
但是放在比如a.aspx中
<tr> <td> <iframe= 'a.aspx '> </td> <td> <iframe= 'b.aspx '> </td> </tr>
这样表头固定就无法实现...

[解决办法]
如果你在a.aspx中设置呢?或者在td中处理?样式是很灵活的东西,这个应该是有办法达到你效果的
[解决办法]
iframe貌似无法获取a.aspx的样式

要么用用户控件 要么直接在a.aspx也用

[解决办法]
让frame自适应宽度 试试呢
<iframe name= "myframe " src= "a.aspx " frameborder= "0 " scrolling= "auto " width= "100% " height= "100% " onload= "document.all[ 'myframe '].style.width=myframe.document.body.scrollWidth " > </iframe>
[解决办法]
马甲..
[解决办法]
看看这个行不行
http://blog.csdn.net/cpp2017/archive/2007/02/03/1501636.aspx

热点排行