Trint,
Why not just set the Width property on the DataGridViewColumn returned
from the indexer call to Columns? You are already using the Visible
property, if it is visible, then just set the width:
this.dataGridView3.Columns[3].Visible = true;
this.dataGridView3.Columns[3].Width = <your width here>;
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"trint" <tr***********@gmail.comwrote in message
news:11**********************@m36g2000hse.googlegr oups.com...
My columns in dataGridView3 are generated on the fly from a Select
statement, so I can't set up any columns properties before it is
created. Sort of the way I make them visible or not like the
following:
this.dataGridView3.Columns[0].Visible = false; //id
this.dataGridView3.Columns[1].Visible = false; //parent_id
How can I set the width of Columns[3]?
Any help is appreciated.
Thanks,
Trint