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

Datagrid / Columns / Autofit

Hello,

I assign a Datatable to a Datagrid.DataSource.

All the columns are displayed with the same width.

I would like them to be set automatically to the best width (something like
Autofit in Excel).

How can I do that ?

Thanks !
Jun 16 '06 #1
1 3050
myname,

Very simple create yourself an autowidth column

http://www.vb-tips.com/default.aspx?...5-f7841cece67a

I hope this helps,

Cor

"myname" <no****@ihatespam.com> schreef in bericht
news:44********@news.sncf.fr...
Hello,

I assign a Datatable to a Datagrid.DataSource.

All the columns are displayed with the same width.

I would like them to be set automatically to the best width (something
like
Autofit in Excel).

How can I do that ?

Thanks !

Jun 16 '06 #2

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...
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: Sean | last post by:
Hello, I have created a Datagrid which is populated by my program. I would like to add code to cause each column to expand to fit its largest item. This is similar to the autofit in Excel. Is...
4
by: Sean | last post by:
Hello, I would like to use the vb equivalent of the excel autofit in a datagrid. I need each column to be the size of its largest element. I do not want all the columns to be the same size. Any...
1
by: Sean | last post by:
Hello, I have a vb application in which I populate a datagrid from a database. The grid populates fine and the data is correct. I need to autofit the columns so that the width of each column is...
1
by: PLSH | last post by:
Good day, I hope some one can help. I would like to programmatically set the width of my webform datagrid columns. Preferably to a set width or otherwise to autofit the entire datagrid. Please...
0
by: DBC User | last post by:
Hi, I have a datagridview and some of the columns values are too big to fit in a default column. I used the autofit as well and is working, but if someone changes the column size and then...
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: 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
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,...
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...
0
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...

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.