BeanSoftware Logo

ASP.NET Database Search Control

    Write For Us

How To Create GridView With ScrollBars?

GridView still have not ScrollBars property. To create GridView with horizontal or vertical scrollbar you need to place GridView inside <div > tag or inside Panel control.

GridView inside <div > HTML tag

To produce GridView scrollbars with div tag, use this code:

<div style="width:100%; height:300; overflow:auto;">
<asp:GridView ID="GridView1" runat="server">

GridView inside Panel Control

To create GridView scrollbars with a little help of Panel control, use this code:

<asp:Panel ID="Panel1" runat="server" ScrollBars="Both" Height="300" Width="100%">
 <asp:GridView ID="GridView1" runat="server">

Related articles:

1. How To Get Web Site Thumbnail Image In ASP.NET

FAQ toolbar: Submit FAQ  |  Tell A Friend  |  Add to favorites  |  Feedback

Copyright © 2002-2008 Bean Software. All rights reserved.