GridView : How to make fixed Header Row

?

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

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

added :

      <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

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Implementing a Fixed GridView Header in ASP.NET (Uses Panels)

Using jQuery

Stackoverflow

Freezing gridview header in a fixed width div
Table – fixed header, scrollable body, most robust/simple solution?


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x