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

Autofit Datagrid Columns

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 ideas on a clean way to do this?

Sean
Nov 20 '05 #1
4 2799
Hi,

http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q877q

Ken
------------
"Sean" <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
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 ideas on a clean way to do this?

Sean

Nov 20 '05 #2
Does not work.

I get hsi error: Object reference not set to an instance
of an object.

Sean
-----Original Message-----
Hello, I would like to use the vb equivalent of the excelautofit in a datagrid. I need each column to be the sizeof its largest element. I do not want all the columns tobe the same size. Any ideas on a clean way to do this?

Sean
.

Nov 20 '05 #3
Hi,

The code looks for the northwind database here c:\northwind.mdb.

Ken
--------------------
<an*******@discussions.microsoft.com> wrote in message
news:0c****************************@phx.gbl...
Does not work.

I get hsi error: Object reference not set to an instance
of an object.

Sean
-----Original Message-----
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 ideas on a clean way to do this?

Sean
.

Nov 20 '05 #4
* "Sean" <an*******@discussions.microsoft.com> scripsit:
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 ideas on a clean way to do this?


See:

<http://www.syncfusion.com/faq/winforms/search/1004.asp>

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

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

Similar topics

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: alex | last post by:
Hi, is there an easy way to 1: make the column witdh to fit the text 2: to fit the table into the grid if it is smaller e.g. to add some space space to each column to fit it nicely into the...
2
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...
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: myname | last post by:
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...
2
by: Arash | last post by:
Is it possible to autofit column width in Access using vba? Something like the following in Excel: Worksheets("Sheet1").Columns("A:I").AutoFit Thanks in advance,
2
by: Lance Hoffmeyer | last post by:
Hey all, Wondering why the syntax won't autofit Column A? I am not getting any errors. Also, is there a way of reducing the number of syntax lines? Basically, I am wondering if there is an...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...

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.