Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / October 2007

Tip: Looking for answers? Try searching our database.

problem sizing a DataGridView

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff - 15 Oct 2007 18:36 GMT
Hey

.NET 2.0

I've created a User Control which contain a DataGridView. This User Control
is displayed on a TabPage. This TabPage is added to the TabControl during
runtime.

The problem is this:
Lets say if I set the size on the DataGridView to width=400px &
height=300px. But during runtime the DataGridView fills the User Control so
that the right & button edges disappear under the User Control GUI. But it
should be a big gap, but the edge disappear and no gap is displayed between
DataGridView and User Control.

Example:
DataGridView.x = 10; (position on the User Control)
DataGridView.y = 10;
DataGridView.width = 100;
DataGridView.height = 100;
User Control.width = 300
User Control.height=300

Then the DataGridView will fill the entire User Control from x/y=10px and
width/height=300px. It should have been width/height=100px

There are no sizing problem if I in visual studio add the tabpage with the
user control. So I think this problem is related to TabPages being added
during runtime.

any suggestions?
Jeff - 15 Oct 2007 22:40 GMT
Solved, the error was because I hadn't set a size on the tabpage.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.