By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,662 Members | 1,052 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,662 IT Pros & Developers. It's quick & easy.

problem sizing a DataGridView

P: n/a
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?
Oct 15 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Solved, the error was because I hadn't set a size on the tabpage.
Oct 15 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.