开发者

Scrollbar on a GridView

开发者 https://www.devze.com 2022-12-14 08:08 出处:网络
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百科.

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消