title: Why are my columns not resizing the way I want them to?
body: <p>OK, so here is the methodology of showing my form:</p>
  
  <p>In the controller:</p>
  
  <pre><code>public void ShowView()
  {
      Form1 View = new Form1();
      PopulateView();
      View.Show();
  }
  
  public static PopulateView(Form1 View)
  {
      //get data to populate DataGridView....
  
      // AutoResizeColumns should resize columns, based on the content of the cells
      View.dgv1.AutoResizeColumns();
  
      // This method should resize any columns that aren't bigger than 100 (resized by AutoResizeColumns) to fit the column header instead.
      var columns = View.dgv1.Columns;
  
      foreach (DataGridViewColumns clm in columns)
      {
          if (clm.Width &lt;= 100)
          {
              clm.AutoSizeMode = DataGridViewAutoSizeColumnMode.ColumnHeader;
          }
      }
  }
  </code></pre>
  
  <p>However, neither of then are working as they should. <code>AutoResizeColumns</code> isn't resizing any columns, as the second method (<code>foreach</code> loop) is firing on all columns. Why is this? Is it because the form is being drawn <em>after</em> I have populated and resized the columns?</p>