473,395 Members | 1,653 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,395 software developers and data experts.

sizing datagrid columns

I have a datagrid with 4 columns, how can I set the width of any particular
column at either design or run time? I'm tired of constantly having to
manually re-size a particular column every time I open the form

Thanks,
Brian.
Nov 20 '05 #1
3 1049
Hi,

Add a tablestyle to your grid.
http://msdn.microsoft.com/library/de...stdatagrid.asp

Ken
--------------------------
"flast" <fl***@markem.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I have a datagrid with 4 columns, how can I set the width of any particular
column at either design or run time? I'm tired of constantly having to
manually re-size a particular column every time I open the form

Thanks,
Brian.

Nov 20 '05 #2
* "flast" <fl***@markem.com> scripsit:
I have a datagrid with 4 columns, how can I set the width of any particular
column at either design or run time? I'm tired of constantly having to
manually re-size a particular column every time I open the form


<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbtchformattingwindowsformsdatagridvisualbasicprim er.asp>
-> "Setting Column Width"

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Thanks guys,

Ill give that a try :)

Brian
"flast" <fl***@markem.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I have a datagrid with 4 columns, how can I set the width of any particular column at either design or run time? I'm tired of constantly having to
manually re-size a particular column every time I open the form

Thanks,
Brian.

Nov 20 '05 #4

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

Similar topics

1
by: Amber | last post by:
The DataGrid allows you to make columns visible or invisible on demand - even edit and other special columns. This article will show you how it is done. Some developers have reported problems...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
4
by: MrMike | last post by:
Is it possible to specify (or somehow set) the amount of space between each datagrid row without changing the amount of space between datagrid columns? I have a datagrid displaying data which...
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.
3
by: Brian Mitchell | last post by:
I hate to ask this question because I'm sure it's been asked before, but how do you automatically resize the columns in a datagrid when the form is resized? Thanks!!
2
by: DC | last post by:
Hi all, is there any short way to accomplish column "auto"-sizing in a Datagrid? (Something like double-clicking column header separator) I suppose datagrid object calls some kind of "internal"...
7
by: Arpan | last post by:
Assume that a database table has the following 4 columns - ID, UserID, Subject & Marks. I am retrieving the records existing in this DB table & displaying them in a DataGrid like this: <script...
0
by: =?Utf-8?B?TmVpbEdvdHQ=?= | last post by:
I have added a datagrid and dock filled it in a split container. I have properties set for the columns to allow resize but I can't resize. Here is the code, I add the data contents row by row...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.