I am handling the RowEditEnded event of my RadGridView to save the changes to the database through a service. But if I get an error from the middle tier, I want to roll back those changes to the row.
At the time RowEditEnded is raised, it is too late to call CancelEdit(), so I thought that using the OldValues property of GridViewRowEditEndedEventArgs would be the best way to go, and apply them to each cell in the row. The problem is that OldValues is a dictionary and GridViewCellBase can only be indexed by position. I could find each cell binding and find the item in OldValues that matches it, but it seems to me that there should be a better way.
Is there an easy way to do this?
At the time RowEditEnded is raised, it is too late to call CancelEdit(), so I thought that using the OldValues property of GridViewRowEditEndedEventArgs would be the best way to go, and apply them to each cell in the row. The problem is that OldValues is a dictionary and GridViewCellBase can only be indexed by position. I could find each cell binding and find the item in OldValues that matches it, but it seems to me that there should be a better way.
Is there an easy way to do this?