troubleshooting Question

ASP.NET Web Forms / VB.NET app, how do you prevent GridView from expanding?

Avatar of sqdperu
sqdperuFlag for United States of America asked on
ASP.NETVisual Basic.NET
4 Comments1 Solution91 ViewsLast Modified:
This is my first attempt to create a "ASP.NET Web Forms application".  I am using VB.NET as the language.

I am having trouble getting the GridView control to stay the same size instead of expanding when there are more than 3 or 4 rows.   I want it to always stay the same size on the page as I am going to add more to the page under it and don't want it to expand over the top of those items.

Things I have tried:
- setting the Height property of the GridView to 140px
- Added "; overflow:auto" Height="140px"" as shown in code below to get vertical scroll bars and to and limit height. (neither which appear to have any effect)
            <asp:GridView ID="grdDrawings" runat="server" BackColor="#CCCCCC" Font-Names="Arial" Font-Size="Small" style="top: 61px; left: 8px; position: absolute; height: 73px; width: 1047px; overflow:auto" Height="140px">
            </asp:GridView>

See the attached files for what my design view looks like and the actual results when I do run it.

NOTE: Please provide a solution that use VB.NET code if at all possible.  
Thanks

Design.JPG---------------------------------------------------------------------------------------------------------------------------------------------------------
Results.JPG
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros