473,473 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

problem sizing a DataGridView

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
1 2461
Solved, the error was because I hadn't set a size on the tabpage.
Oct 15 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Olav Tollefsen | last post by:
Take a look at this page: http://www.webinnovation.no/test/test.htm Why is the left table with the text "Menu" not 160 pixels as stated in the HTML code? Olav
1
by: sapkal.manish | last post by:
Question : How can I find actual row position of DataTable in DataGridView when DataTable is sorted / My source code like this Private WithEvent dgvInwDet as new DataGridView Private...
1
by: Rich | last post by:
Hello, I am reading data from a sql server table that is under replication. This table has the replicatin GUID column that is generated with replicatin. I am reading the data from a...
6
by: George | last post by:
Hi, I have been encountering a refresh problem with DataGridView, which is bound to a DataTable. When I make updates (Add, Delete, update) to the DataGridView, everything flow nicely to...
4
by: shibeta | last post by:
Hello, I have problem with DataGridView and BindingSource. I have created DataSet and added TableData to it with manualy created columns (without DataAdapter - I'm not using MSSQL). On the Form I...
0
by: anthony.gilliam | last post by:
Hi Everyone, I'm loading a windows form dataGridView with a table saved on an .xml doc. The table loads and edits fine. I have other buttons and controls on the form, so I wouldn't like to...
0
by: mianghous | last post by:
hi I have a little problem i m using a datagridview on ma aspx page and problem is that its size does not remain same... mean if i fecth 10 records it will show 10 and size will expand of the...
0
by: miikka | last post by:
Is it possible to have dynamic update (preview) when re-sizing column in DataGridView?
0
by: priyamtheone | last post by:
I'm trying to make a datagridview column to act like a datetimepicker column (C#.Net 2005). These are the behaviours that the dgv should have: 1) Initially all the cells of the dtp column should be...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.