Possible Duplicate:
simple DataGridView refresh question
I have a mainForm which has a DataGridView which has a bunch of databound items from a List. From there I can edit a selected row in the DataGridView (and the list obviously) by opening up a new form and changing the content using text boxes and such. The editing is working fine, however, once I close the edit form, the datagridview is not refreshing? In order to view the updated items I have to reload the items from the list.
At the moment I'm doing this in the edit form during the exit button click event but to no avail:
MessageBox.Show("Client successfully edited");
mForm.DataGridViewProp.EndEdit(); //dgv property within the mForm
mForm.DataGridViewProp.Refresh(); //dgv property within the mForm
mForm.DataPanel.Invalidate(); //the panel the dgv is in
mForm.DataPanel.Refresh(); //the panel the dgv is in
this.Close();
Where mForm is an instance of the main form:
private mainForm mForm = new mainForm();
I repeat, the edit is working 100% fine, it's simply not refreshing the DGV.
Any help is greatly appreciated.
Thanks