473,503 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Increase Datagridview size by dragging the form

Hi,

I have a datagridview and some Buttons on a form. When I drag the form down
to increase its size at run time, i want the datagridview also to increase
in size so that i can view all the data in the grid at a time, instead of
scrolling.
This is a common scenario but i am not able to figure out how to do this.

TIA
Irfan
Jan 12 '07 #1
2 2519
Hi,
You could change the size of the DataGridView in the forms OnSizeChanged
event

Mike Powell
www.ramuseco.com

"Irfan" <ir***@asc-ltd.co.ukwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hi,

I have a datagridview and some Buttons on a form. When I drag the form
down to increase its size at run time, i want the datagridview also to
increase in size so that i can view all the data in the grid at a time,
instead of scrolling.
This is a common scenario but i am not able to figure out how to do this.

TIA
Irfan


Jan 12 '07 #2
I don't know where the buttons on your form are. If they are
at the top, Set the anchor properties of your DataGridView
to Left, Right, Bottom. If your buttons are elsewhere, just act
accordingly.

You can also add a panel to your form and put the DGV inside it
(dock inside parent). Then set the anchoring properties on the panel.

Robin S.
------------------------
"Irfan" <ir***@asc-ltd.co.ukwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hi,

I have a datagridview and some Buttons on a form. When I drag the form
down to increase its size at run time, i want the datagridview also to
increase in size so that i can view all the data in the grid at a
time, instead of scrolling.
This is a common scenario but i am not able to figure out how to do
this.

TIA
Irfan


Jan 12 '07 #3

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

Similar topics

5
23273
by: VMI | last post by:
How can I increase the maximum size of a Windows form? I'm trying to make a really big Windows form (about 1000x1000) but the designer doesn't allow me to do that. It only goes up to 1000x780....
0
415
by: Mark Carew | last post by:
Hi, I'm writing a winform app (as practice) that has as one of its features a button that reads an xml file to a datagridview. No matter what I do I get two columns instead of one. The...
2
7408
by: Rich | last post by:
Hello, Some database applicatins have a tooltip feature where when you are dragging the scrollbar of the table view a tooltip appears next to the mouse cursor displaying the approximate record...
7
15611
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
1
2891
by: Chalkie | last post by:
Hello, I've hit what appears to be a serious problem with an unbound datagridview control that Ive added to a VB.Net program. Inadvertently I named one column 'Name' and a second 'Size'. The...
0
3560
by: Bill Cart | last post by:
I have a datagridview that was created by dragging an SQL stored procedure onto the form. The SQL query has fields for Monday, Tuesday, etc. I am trying to set some of the values with the...
1
1829
by: hughwarrington | last post by:
Hi there, I'd like to detect when the user resizes a column on a DataGridView by dragging the separator situated between columns. There is the ColumnWidthChanged event, but I can't find a way of...
1
1961
by: RobcPettit | last post by:
Hi, on a form i have a splitcontair. In panel1 I have a list box. In panel2 I have a datagridview. I add data using dataset and the column number is always 10, but the row can be any number. Id...
0
2464
by: Peted | last post by:
Hello, Ive got a datagridview, on a splitcontainer, in a system.windows.forms.usercontrol. The datagrid view by default shows 3 colums of data and fills exactly the size of the user control...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6975
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...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4992
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
4666
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
3160
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...
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.