Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to update the Table in SQL.
But the condition is that..,
Only the modified rows should be get updated to the table.
Posted
Comments
Kornfeld Eliyahu Peter 14-Jun-15 4:59am    
How your grid binded to data?
wajeed 14-Jun-15 5:35am    
My DataGrid is Binded to the Temporary DataTable.
and Temporary table will get the data from the sql query.

1 solution

According to your comment there is a DataTable involved, so you can use the GetChanges method to see all the rows changed...
https://msdn.microsoft.com/en-us/library/k2552649(v=vs.110).aspx[^]
https://msdn.microsoft.com/en-us/library/5dxfaha8(v=vs.110).aspx[^]
 
Share this answer
 
Comments
wajeed 14-Jun-15 6:08am    
Is it possible to reflect back to the DataGrid to show which rows are going to be changed...? (I mean, by changing the Rows' background color)

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