Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Gridview causing table to resize to size of grid

Status
Not open for further replies.

dbsquared

Programmer
Nov 7, 2002
175
US
I have a gridview in a table so that the user only has to scroll down within the smaller window and not go down a long page.
I have used this with datagrids many times and now I have converted to a gridview this issue is popping up.

Below is the HTLM for the table and the gridview.
What I would like is for the table to not resize with the gridview and the table will put a scroll bar on.

Any help would be appreciated.
Thanks
Code:
    <DIV style="BORDER-RIGHT: 1px solid; TABLE-LAYOUT: fixed; BORDER-TOP: 1px solid; Z-INDEX: 101; OVERFLOW: auto; BORDER-LEFT: 1px solid; WIDTH: 98%; CURSOR: default; BORDER-BOTTOM: 1px solid; POSITION: relative; TOP: 24px; HEIGHT: 82%; left: 0px; "align="justify">
      <asp:GridView ID="dgDatabase" runat="server" AutoGenerateColumns="False" BackColor="White" 
                    BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black"
                    GridLines="Vertical" AllowSorting="True">
                    <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                    <AlternatingRowStyle BackColor="#CCCCCC" />
                    <FooterStyle BackColor="#CCCCCC" />
[COLOR=red]blah blah blah[/color]

       </asp:GridView>
     </DIV>

To go where no programmer has gone before.
 
This would be most easily accomplished by using an iframe in the table and putting the gridview inside the iframe.
 
I'd say it would be easier to use a div tag instead (check out the "overflow: auto" method).


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I used a panel and it works great thanks

To go where no programmer has gone before.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top