473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 1756
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
by: Prateek | last post by:
Hi, How can I change the width of a column in datagrid control? TIA Prateek
9
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
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
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
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
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
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
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
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
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
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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,...

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.