I have two forms.. form1 and form2 in form1 i have gridview with three columns and in form2 i have two buttons one is add button and second one is update button and i have three text boxes …
i have done like this if we click any of grid view column in form1 then the form 2 will be displayed with textboxes fill with grid view row values ..
now i need to add another row to gridview by using this add button in form 2 .. so when i fill the textboxes and click on add button the form 2 will be closed and the form 1 grid view is update automatically with these details …
i am using winforms application and using linq to entites for doing databse operations ..
any idea pls…. for doing this…
Declare event in form2 for AddRow, subscribe to that event in form1, when button clicked on form2 and new row have to be added, form2 raises that event, so form1 handles it and shows it on DataGrid.
Tutorial for event implementation you can find here:
http://msdn.microsoft.com/en-us/library/aa645739(v=vs.71).aspx