views:

61

answers:

2

I want to put a scrollbar on a gridview....Is it possible in Visual Studio? I have created a master page--in this page I want a windows with static height and width, and inside this window put a gridview....

A: 

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>
Bhaskar
A: 

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>
Dan Diplo