0

How to achieve scroll bar for gridview control in asp.net only for rows but not for header too.

Thanks in advance.

skaffman
  • 390,936
  • 96
  • 800
  • 764
user616839
  • 199
  • 2
  • 4
  • 12

2 Answers2

0

Just change this code as your own. You will get scroll when grid view size exit the div size.

<body>
<form id="form1" runat="server">
<div style="height:200px; width:300px; overflow:auto;">
    <asp:GridView ID="GridView1" runat="server">
    </asp:GridView>
</div>
</form>
</body>
sydur.rahman21
  • 151
  • 1
  • 2
  • 8
-1

put the rows in div and add "style=overflow:auto" in the div style Above code will add scroll bars in the grid

Saurabh
  • 5,583
  • 2
  • 23
  • 32