Scrollbar on a GridView
I want to put a scrollbar on a GridView in ASP.NET. I have created a master page. In this page I want a window with static height and width and inside this window put a GridView开发者_Go百科.
Is it possible to do this in Visual Studio?
Why not put that grid in a div and add an overflow to it. So, once the grid is rendered, it will be enclosed in that div with scrollbars.
<div style="overflow: auto; width: 200px; height: 200px">
<asp:GridView ID="GridView1".....
</div>
You could try putting the gridview within a div and then setting a height and adding CSS overflowstyle to it.
eg.
<div style="height:400px; overflow:scroll">
<asp:Gridview ID="Gv1" runat="server" />
</div>
精彩评论