Hello:
I am populating a DataGridView and would like to make the columns the minimum size as long as the data can fit in them. I have tried the following line and it works:
dataGridViewReport_Process.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
But: If I do it to the second column it will mess it up. Seems it will only allow me to do only one column.
Is there a way that I can have it do all the columns in the DataGridView?
How Do I: Make columns in a DataGridView the minimum size?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sam HobbsRank #107 · 20.5K reputationPosted Apr 11, 2010, 7:41 PM EDT
GustavoRank #1,990 · 732 reputationPosted Apr 11, 2010, 7:51 PM EDT
YES... that did it. Thanks.