469,143 Members | 963 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,143 developers. It's quick & easy.

Autosize DataGrid columns

After filling data from a SQL server into a DataTable in a DataSet, I set a
DataGrid.DataSource to point to the DataTable. The grid displays the data
but all the columns are the same size. How do I get the colums to adjust
their width automatically so that the user does not have to double-click the
columns header border.

I would apreciate any help.
I'm using VisualBasic .NET v7 - 2003

Thanks
Nov 22 '05 #1
1 1580
you need to look at DataGrid.TableStyles property (if you are talking Win
form DataGrid).

"Jinx" <ji**@bell.ca> wrote in message
news:OT********************@news20.bellglobal.com. ..
After filling data from a SQL server into a DataTable in a DataSet, I set a DataGrid.DataSource to point to the DataTable. The grid displays the data
but all the columns are the same size. How do I get the colums to adjust
their width automatically so that the user does not have to double-click the columns header border.

I would apreciate any help.
I'm using VisualBasic .NET v7 - 2003

Thanks

Nov 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by | last post: by
1 post views Thread by Jinx | last post: by
2 posts views Thread by Tim Wallace | last post: by
3 posts views Thread by Jim Heavey | last post: by
1 post views Thread by one | last post: by
1 post views Thread by Silvia | last post: by
9 posts views Thread by Kevin Westhead | last post: by
1 post views Thread by Gunjan Shah | last post: by
1 post views Thread by SAL | last post: by
reply views Thread by Srinivas Kollipara | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.