I have a gridview where the user will be able to enter values and save the changes made. I want to show the user the changes he made so far in the grid and traverse him through the changes on next and previous button clicks like how we do in TFS and other compare tools.
Can you please suggest me how can I achieve this compare functionality in c#?
Are there any open source dll’s available to do the comparison and traverse through the changes. Any help will be appreciated..Thanks.
I don’t think there’s a need for any open source. You’re the owner of your data, so I assume you know how to compare rows yourself.
All you have left to do is to put the index numbers of all the modified rows into an array/list, and by the position in this list you can tell which row was modified.
This looks better in code:
You can place Prev/Next buttons on your form and handle their
Clickevent to callMoveToNextIndex()/MoveToPrevIndex().Assuming you’re talking about a DataGridView, you can set the CurrentCell property according to the, which you can get from
ModifiedRows.CurrentModifiedRowIndex.