GridView控件:如何使固定标题行 [英] GridView : How to make fixed Header Row

查看:354
本文介绍了GridView控件:如何使固定标题行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

需要得到垂直滚动条固定标题行,因为我的GridView控件是非常大的。

Need fixed Header Row from Vertical Scroll bar, because my GridView is very large.

2制作小组是我最好的尝试(但也不会工作):

Making 2 panels was my the best try (but also won't works) :

补充道:

      <asp:Panel style="width:720px;" runat="server" ScrollBars="Horizontal">
      <asp:GridView ID="GV3" runat="server" />          
      <br />
      <asp:Label ID="justfortest" Text="11111" runat="server" />
      <hr />
      <asp:Panel style="max-height:400px;border-style: outset; border-width: 4px; " 
              ID=HGix runat="server" ScrollBars="Vertical">
            <asp:GridView ID="GridView2" runat="server" CellPadding="4" 
            .........................
            </asp:GridView>

       </asp:Panel>
       </asp:Panel>

为什么水平线增加了第二个面板,它的滚动条=垂直,但可以作为两个

why the horizontal line adds to second panel, it's ScrollBars="Vertical" but works as Both

推荐答案

<一个href=\"http://www.shareknowledges.com/57/section-ASPNET/Implementing-a-Fixed-GridView-Header-in-ASPNET.aspx/111\"相对=nofollow>实现一个固定的GridView头在ASP.NET(使用面板)

使用jQuery

#1

<一个href=\"http://stackoverflow.com/questions/263333/freezing-gridview-header-in-a-fixed-width-div\">http://stackoverflow.com/questions/263333/freezing-gridview-header-in-a-fixed-width-div
<一href=\"http://stackoverflow.com/questions/1301049/table-fixed-header-scrollable-body-most-robust-simple-solution\">http://stackoverflow.com/questions/1301049/table-fixed-header-scrollable-body-most-robust-simple-solution

这篇关于GridView控件:如何使固定标题行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆