Refresh form1 from form2
-
Dear developers, I am coding a very small project for my study. I want to refresh form1 after form2 is closed. For example, I open form1 and click one button to open form2 and in form2 I can insert data to the database (ex : tblItem). In addition, combobox in form1 retrieves data from the database (tblItem) too. So, after inserting data from form2 and when I close the form2, I want the comboxbox in form1 refresh to retrieve the last update of tblItem data. Please advise, thanks. Visoth
Chuon Visoth Angkor Wat - Cambodia asp.net - c sharp beginner
-
Dear developers, I am coding a very small project for my study. I want to refresh form1 after form2 is closed. For example, I open form1 and click one button to open form2 and in form2 I can insert data to the database (ex : tblItem). In addition, combobox in form1 retrieves data from the database (tblItem) too. So, after inserting data from form2 and when I close the form2, I want the comboxbox in form1 refresh to retrieve the last update of tblItem data. Please advise, thanks. Visoth
Chuon Visoth Angkor Wat - Cambodia asp.net - c sharp beginner
How are you showing form2? If you use
form2.ShowDialog()
, it won't return until you close form2, so you can just add code after this line in form1. Nick---------------------------------- Be excellent to each other :)
-
How are you showing form2? If you use
form2.ShowDialog()
, it won't return until you close form2, so you can just add code after this line in form1. Nick---------------------------------- Be excellent to each other :)