hi,
I am working in Windows Application using C#.
In my application when I close the child window then the DataGridView in the parent window need to be automatically refreshed, and display updated values
help me please
thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenPosted Aug 13, 2008, 11:43 PM
Satish KathiPosted Aug 12, 2008, 3:30 PM
If you are constrained not to use ShowDialog() handle the Closed event of the child form
Form2 childForm = new Form2();
childForm.FormClosed += new FormClosedEventHandler(childForm_FormClosed);
childForm.Show();
void childForm_FormClosed(object sender, FormClosedEventArgs e)
{
//Your logic to refresh the DataGridView goes here
}
Ryan AlfordPosted Aug 12, 2008, 9:24 AM