473,511 Members | 13,618 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid column width

Eva
How do i indivually change the width of a datagrid
coloumn?

I am currently using the PrefferedColoumnWidth property,
but due to space restrictions i do not want all the
columns at the same width.

Any help is appreciated.
Nov 22 '05 #1
6 1764
On Sun, 16 Nov 2003 05:30:58 -0800, "Eva" <s@i> wrote:

¤ How do i indivually change the width of a datagrid
¤ coloumn?
¤
¤ I am currently using the PrefferedColoumnWidth property,
¤ but due to space restrictions i do not want all the
¤ columns at the same width.
¤

Have you tried Width property of the DataGridColumnStyle class?
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #2
On Sun, 16 Nov 2003 05:30:58 -0800, "Eva" <s@i> wrote:

¤ How do i indivually change the width of a datagrid
¤ coloumn?
¤
¤ I am currently using the PrefferedColoumnWidth property,
¤ but due to space restrictions i do not want all the
¤ columns at the same width.
¤

Have you tried Width property of the DataGridColumnStyle class?
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #3
On Mon, 17 Nov 2003 08:08:55 -0800, "Eva" <an*******@discussions.microsoft.com> wrote:

¤ hi Paul,
¤ Is this set through code or through a property on the IDE?
¤
¤ if its set through code do u have an example i could see?
¤

See if the following helps:

HOW TO: Programmatically Set the DataGrid Column Width to the Longest Field by Using Visual Basic
..NET
http://support.microsoft.com/default...&Product=vbNET
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #6
On Mon, 17 Nov 2003 08:08:55 -0800, "Eva" <an*******@discussions.microsoft.com> wrote:

¤ hi Paul,
¤ Is this set through code or through a property on the IDE?
¤
¤ if its set through code do u have an example i could see?
¤

See if the following helps:

HOW TO: Programmatically Set the DataGrid Column Width to the Longest Field by Using Visual Basic
..NET
http://support.microsoft.com/default...&Product=vbNET
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #7

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

Similar topics

5
3358
by: Prateek | last post by:
Hi, How can I change the width of a column in datagrid control? TIA Prateek
9
3929
by: web1110 | last post by:
Hi y'all, I have resized the columns in a DataGrid and I want to set the width of the DataGrid to fit the columns. Just summing the column widths is too short due to the grid and gray row...
3
4224
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint...
2
6375
by: CSL | last post by:
I am using the DataGrid in a Windows Application, how can I adjust the widths of each column individually.
4
1818
by: Steve | last post by:
I am fairly new to VB.NET, and I am rewriting an application I wrote a while back, also in VB.NET. I aplied some new things I learned. Anyway, here is my problem....... I have a custom DataGrid...
17
7413
by: Mike Fellows | last post by:
im trying (unsucessfully) to add a checkbox column to my datagrid i basically have a datagrid that im populating from a dataset Me.DataGrid1.DataSource = ds.Tables(0) the datagrid then has 5...
6
2735
by: Agnes | last post by:
I understand it is impossible, but still curious to know "Can I freeze several column in the datagrid, the user can only scroll the first 3 columns (not verical), for the rest of the coulumn, it is...
2
10379
by: Charleees | last post by:
Hi all, I have a DataGrid with Template Columns..... There are LAbels,Linkbuttons in the Single Row.. I have to set the Constant Column width for those Template Columns in Grid... Wat...
2
1764
by: cj | last post by:
I was looking over some of my 2003 code today (see below) that loads a foxpro table via oledb connection. I used a sub "autosizecolumns" I found on the web but I never quite understood why they...
2
6562
by: =?Utf-8?B?Y3JlYXZlczA2MjI=?= | last post by:
I have a nested datagrid in a xaml file, the parent datagrid loads the vendor information and the details loads the documents for that vendor in a datagrid. Everything is working fine until I click...
0
7251
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
7430
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...
0
7517
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
5673
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,...
0
3230
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
3217
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1581
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 ...
1
790
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
451
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.