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

实现一个固定的GridView头在ASP.NET(使用面板)

使用jQuery

#1

http://*.com/questions/263333/freezing-gridview-header-in-a-fixed-width-div
http://*.com/questions/1301049/table-fixed-header-scrollable-body-most-robust-simple-solution