VB.Net 2005 Express - DataGridView: AutoSizeColumns

BarrySumpter
08-21-2006, 11:21 PM
Hi all,

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvsdev05/html/vs05a9.asp

This article claims to do exacely what I want to do.
Which is to center all column header text and left, center, right align all datatext as I see fit, and then AutoSize the column widths.

But it just doesn't compile at all.


Does anyone have any code that works?

Specifically the AutoSizeColumns code for a DataGridView in VB.NEt 2005 Express? Or a hyperlink to same?

Any help would be greatly appreciated.

BarrySumpter
08-21-2006, 11:26 PM
myGridView.AutoResizeColumns()

Jeez! Same again - spent an hour looking for this - and within seconds of posing on Xtreme VB Talk I found it.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum