GridView way too big

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

I have

<asp:GridView ID="GridViewListDataBases" runat="server" Style="width:900px"
</asp:GridView>

with

GridViewListDataBases.DataBind()

in the code behind.

Produces many columns and the GridView become much too wide.

The 900px is ignored

I need it to remain confined with a scrollbar.



Can I do that?





Thanks in advance
 
Mark said:
Put it inside a <div /> or <asp:Panel />

I had tried div before posting.
After your post I tried harder but it did not work for me.

So I tried:
<asp:Panel runat="server" style=" width:900px; border:solid 2px green" >

<asp:GridView ID="GridViewListDataBases" runat="server">

</asp:GridView>

</asp:Panel>

I hadn't thought to use a border to see what was happening when I tried the
div but with the Panel I found that the panel is indeed 900px but the
GridView extends past the right end of the Panel.

InteliSense does not seem to give my an option to turn scrollbars on.

Thanks much
 
Just an observation.
Looks like it is not well implemented in IE8.
I used "auto"
Looks like it made the Panel height to just fit the GridView.
Then added the H-Scroolbar at the bottom so now the Panel is not height
enough for both so it had to add a V-Scrollbar.

Thanks again for the help
 
Back
Top