Hi All
I have 3 dropdowns, two buttons (one to add data to datagrid and the other to save data to database) and a link label in form1. When I add data to datagrid (without saving) and click on link label, form2 will be opened. When I come back to form1, the data that I have added to datagrid of form1 is lost.
Please suggest me a solution for this.
Thanks in adv
Loading
Kumar AGPosted Jan 6, 2010, 3:04 PM
When you are opening a 2nd form what are you doing with 1st form are you closing and re-instantiating the 1st form when you are coming back? If yes you will lose all the data in 1st form.
What are you doing on the second form?
Instead of closing the 1st form hide the 1st form and open the second form when you want to come back unhide the 1st form.
Or
When you are calling the 2nd form call ShowDialog
Hope this helps
Nilanka DharmadasaPosted Jan 6, 2010, 7:05 AM
Sorry. I cannot figure out your issue without looking at your code.
Srikanth ThadishettiPosted Jan 6, 2010, 6:41 AM
I need the data in the form1 to remain in the same state as it was before form2 is loaded
Nilanka DharmadasaPosted Jan 6, 2010, 12:38 AM
I cannot guess the reason from what you have given. Because there is no problem in what you have given.
If you can upload your code here, it will be easier to find the issue.