GridView way too big

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
 
A

AAaron123

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
 
A

AAaron123

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top