title: Refresh DataGridView when updating data source
body: <p>What is the best way to refresh a <code>DataGridView</code> when you update an underlying data source?</p>
  
  <p>I'm updating the datasource frequently and wanted to display the outcome to the user as it happens.</p>
  
  <p>I've got something like this (and it works), but setting the <code>DataGridView.DataSource</code> to <code>null</code> doesn't seem like the right way.</p>
  
  <pre><code>List&lt;ItemState&gt; itemStates = new List&lt;ItemState&gt;();
  dataGridView1.DataSource = itemStates;
  
  for (int i = 0; i &lt; 10; i++) { 
      itemStates.Add(new ItemState { Id = i.ToString() });
      dataGridView1.DataSource = null;
      dataGridView1.DataSource = itemStates;
      System.Threading.Thread.Sleep(500);
  }
  </code></pre>