Refresh DataGridView C#
<p>I have a dataGridView bound to a table. On the same form as the DataGridView I have a few texboxes and a button to add new values to the database and want them displayed in the gridView too. Saving in the database works, just the new values are not shown in the gridView. I have tryed the following:</p>

<pre><code>this.Validate();
this.pBindingSource.EndEdit();
this.pTableAdapter.Update(this.DBDataSet);
pDataGridView.Refresh();
</code></pre>

<p>This didn't work. From my understanding the .Refresh method only redraws the GridView, so it should work after updating the tableAdapter, so i thoght. But it doesn't.</p>

<p>Then I've tried :</p>

<pre><code>this.pDataGridView.DataSource = null;
this.pDataGridView.DataSource = this.pBindingSource;
pDataGridView.Refresh();
</code></pre>

<p>which doesnt work eighter. Then tried to ResetBindings() for the binding source, which didnt work, and then I ran out of ideeas.
Could anyone please tell me what Ive done wrong, or better, whats the best way to refresh the DataGridView.</p>

<p>Thanks</p>
