how to refresh the parent form from child form..?

Posted by Mittaikariss under C# on 9/21/2011 | Points: 10 | Views : 2606 | Status : [Member] | Replies : 1
my first form is datagridview .side buttons is..add ,edit, delete,and i want add some details then click add button then open another insert the data from add add form close after inserted data...i want automatic refresh the form1..

i am using f
orm1 obj=new form1();

but it is not work..
how do that..?



Posted by: Ndebata on: 9/21/2011 [Member] Starter | Points: 25

Hello Friend,

You have Two forms MainForm where datagridview is there and another form which to Add or edit details.
Try to add a even in your child form and register that event in Main form before calling show method of child form and invoke the event on click event of close button in child form.

You are done.
What ever you want to do when you close the child form can be written to the method reffered by the child form event.

Mittaikariss, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response