Hi,
Your inserting the data through Form1.
Create table at the back -end ie., in your database.
Now insert all your values into table and finally redirect to Form 3.
In Form 3, in pageload, bind all the values from your database to your DataGridView control.So that the values present in your table will get displayed when you run your application.
Similarly,
Add Update button to your DataGridView Control.
Whenever you click on a particular row you will get all the values of that row in your onclick event of Update button.
You will also get the ID of that row, store this ID in Session variable and at last redirect it to Form 2.
In Form 2, in the pageload write a select query to get all the values related to that ID, and assign those values to List.
Open your .design page and add the required number of textboxes.. and a Save button.
Keep a Label control for the ID field so that you can modify or Update based on the ID field.
Again in your .cs, assign the values to the related texboxes from the List.
Now the values for the selected row will get displayed in the texboxes, modify the data and click on Save button.
in the onclick event of the save button, write an Update query updating the columns that you want sumthing like
UPDATE TABLENAME SET FirstName="txtFName", LastName="txtLName" ....
WHERE ID=Session["ID"]
Finally redirect it to Form 3.
You can find the Updated values for the row you selected....
Regards,
Shree M.
Kavya Shree Mandapalli
Svyasaraj, if this helps please login to Mark As Answer. | Alert Moderator