Click here to Skip to main content
15,911,142 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear seniours,
I have showed a table in gridview on a form.

Now i want to make changes in the gridview cells and when i click save these changes should be reflected back in database and my griview should be updated.
Posted
Updated 7-May-10 20:07pm
v3

When you update the database you sould try reading the data from it at the end of your update procedure.

private void UpdateData(){
   // ... Update logic

   ReadDataFromTheDatabase();
}


Note: if you use tableAdapters to update, if I recall corectly, the Update method syncronizes the dataTable with the data in the database.
 
Share this answer
 
it has C# examples also



http://www.dotnetspider.com/forum/182755-data-gridview-edit-delete-update-C-net.aspx


http://en.csharp-online.net/Working_with_Data%E2%80%94Using_the_DataGridView
 
Share this answer
 
:-O :omg: :mad: :rolleyes: :-\ :doh: :( ;) :-D :) ;P
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900