title: How to refresh datagridview when closing child form?
body: <p>I've a dgv on my main form, there is a button that opens up another form to insert some data into the datasource bounded to the dgv. I want when child form closes the dgv auto refresh. I tried to add this in child form closing event, but it doesn't refresh:</p>
  
  <pre><code>private void frmNew_FormClosing(object sender, FormClosingEventArgs e)
          {
              frmMain frmm = new frmMain();
  
              frmm.itemCategoryBindingSource.EndEdit();
              frmm.itemsTableAdapter.Fill(myDatabaseDataSet.Items);
              frmm.dataGridView1.Refresh();
          }
  </code></pre>
  
  <p>However, when I add this code in a button on the parent form, it actually does the trick:</p>
  
  <pre><code>        this.itemCategoryBindingSource.EndEdit();
          this.itemsTableAdapter.Fill(myDatabaseDataSet.Items);
          this.dataGridView1.Refresh();
  </code></pre>