title: How to make gridview in asp.net scrollable?
body: <p>I want to know how can i make my asp.net gridview scrollable vertically and horizontally without using CSS and html.</p>
  
  <p>this is my code on how I make gridview scrollable</p>
  
  <p>in CSS:</p>
  
  <pre><code>div#scroll  
  {
  border: 1px solid #C0C0C0;
  background-color: #F0F0F0;
  width: 584px; 
  height: 180px; 
  overflow: scroll; 
  position: relative;
  left: 39px;
  top: 813px;
  }
  </code></pre>
  
  <p>in HTML:</p>
  
  <pre><code>&lt;div id = "scroll"&gt;
  &lt;asp:GridView ID="tblitem" runat="server" CellPadding="4" 
  ForeColor="#333333" GridLines="None" 
  style="z-index: 1; left: -2px; top: 0px; position: absolute; height: 57px; width: 584px" 
           AutoGenerateSelectButton="True" Visible="False"&gt;
           &lt;AlternatingRowStyle BackColor="White" /&gt;
           &lt;EditRowStyle BackColor="#7C6F57" /&gt;
           &lt;FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" /&gt;
           &lt;HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" /&gt;
           &lt;PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" /&gt;
           &lt;RowStyle BackColor="#E3EAEB" /&gt;
           &lt;SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" /&gt;
           &lt;SortedAscendingCellStyle BackColor="#F8FAFA" /&gt;
           &lt;SortedAscendingHeaderStyle BackColor="#246B61" /&gt;
           &lt;SortedDescendingCellStyle BackColor="#D4DFE1" /&gt;
           &lt;SortedDescendingHeaderStyle BackColor="#15524A" /&gt;
      &lt;/asp:GridView&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>I dont want to use this because when I hide my gridview, the div scroll that I make is visible.</p>