Home All Groups Group Topic Archive Search About

How To: Change ColumnWidth AT runtime on DataGridView in VB.net 2005

Author
14 Mar 2006 1:47 PM
Eric Fortin
I have a DataGridView that I bind to a dataset at runtime (I do not set up
the data grid view for binding to that specific dataset at design time) and
I want to save the manually resized column widths so that next time the user
uses the screen, I can reset the width to what they manually made the last
time they were in the screen.  The problem is that no matter what I do, the
width always returns to the original width of the column.  I can
programmatically set to, say 330, but it's always reset (and shown) as 100.
I cannot figure out how to make the width of each column unique at runtime.

Any help with this problem?

Thanks

Author
14 Mar 2006 2:03 PM
Chris Dunaway
What is the AutoSizeMode property of your columns set to?  Have you
tried setting that property to None?
Author
16 Mar 2006 1:58 PM
Eric Fortin
It is set to None and I still have the problem....

Show quoteHide quote
"Chris Dunaway" <dunaw***@gmail.com> wrote in message
news:1142345021.808418.285140@i40g2000cwc.googlegroups.com...
> What is the AutoSizeMode property of your columns set to?  Have you
> tried setting that property to None?
>