Wednesday, January 5, 2011

Scroll bars in a asp .net datagrid control

There is a way to add scroll bars to a datadrig without using DIV tags, the solution is very simple, all you have to do is to put your grid inside of a panel control and set the ScrollBars attributes to "Both", see the code below:

<asp:Panel ID="pn_orders" runat="server" ScrollBars="Both" Height="350" Width="500">
                    <asp:GridView ID="dgOrders" runat="server">
                    </asp:GridView>
                </asp:Panel>


If you rather to use DIV tags, there is a great web site where you can find a simple example:
http://www.dnzone.com

No comments:

Post a Comment