title: Refreshing DataGridView bindings to a list when a row is deleted
body: <p>I have a WinForm app with multiple DataGridViews bound to SortableBindingLists.</p>
  
  <p>Under some circumstances, I need to programmatically delete an item from the list that grid is bound to.</p>
  
  <p>I can't seem to get the DGV to recognize that it's data has changed, or, specifically, that it has fewer rows. I'm calling dataGridView1.Invalidate(), and it's repainting the grid, but it tries to repaint as many rows as their were before, and throws a series of exceptions that "Index  does not exist", one exception for each column.</p>
  
  <p>Here's a simplified code sample that exhibits the problem: (just a WinForm with a DGV and a button.)</p>
  
  <pre><code>    private List&lt;Employee&gt; list;
      private void Form1_Load(object sender, EventArgs e)
      {
          list = new List&lt;Employee&gt;();
          for (int ix = 0; ix &lt; 3; ix++)
          {
              list.Add(ObjectMother.GetEmployee(ix+1));
          }
  
          dataGridView1.DataSource = list;
      }
  
      private void cmdDeleteARow_Click(object sender, EventArgs e)
      {
          list.Remove(list[0]);
          dataGridView1.Invalidate();
  
      }
  </code></pre>
  
  <p>In ASP.NET, when using a GridView control, there's a "DataBind()" method you can call to force it to refresh it's data. There does not seem to be any such thing in WinForms, or am I missing something?</p>