Home All Groups Group Topic Archive Search About

Datagrid / Columns / Autofit

Author
16 Jun 2006 12:57 PM
myname
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 !

Author
16 Jun 2006 1:43 PM
Cor Ligthert [MVP]
myname,

Very simple create yourself an autowidth column

http://www.vb-tips.com/default.aspx?ID=d7d87026-c86b-491c-a535-f7841cece67a

I hope this helps,

Cor

Show quoteHide quote
"myname" <nospam@ihatespam.com> schreef in bericht
news:4492a85f$1@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 !
>
>