I'm using DataGrid component without much alterations from the version in the demo. When updating, after clicking Save button, following method is called:
void OnRowUpdated( SavedRowItem<Employee, Dictionary<string, object>> e )
{
//var employee = e.Item;
//employee.FirstName = (string)e.Values["FirstName"];
//employee.LastName = (string)e.Values["LastName"];
}
I am assuming that the reason why e.Values is accessed is because they are supposed to contain updates, whereas e.Item should have the old values. However when debugging I can see that both of those contain same values.
Not 100% sure whether this a bug or working as intended.
If it is working as intended, however - is there any reason to use e.Values instead of getting values straight from e.Item?
This is an example from my code, taken at the same breakpoint - first looking at e.Item values, and then at e.Values:

My understanding is that RowUpdating will show e.Item with the old values and e.Values as the proposed value changes (this is also an event that can cancel the edit if needed).
While RowUpdated will show e.Item as the final copy once edits have been applied.
Hope this helps.
Hi @smilyte, sorry to not answer before. A lot has happen in the last few days.
Anyway, what @MitchellNZ said is true. When RowUpdated is called it means all edits have being applied so thats why item and values are both the same. The reason why I keep both of them in the API is for convenience. That way you can decide if you want to save full entity into your repository or just do the partial update.
Ah, sorry about that - I somehow completely missed that there also was updating method :)
Thanks a lot!
Most helpful comment
Hi @smilyte, sorry to not answer before. A lot has happen in the last few days.
Anyway, what @MitchellNZ said is true. When
RowUpdatedis called it means all edits have being applied so thats why item and values are both the same. The reason why I keep both of them in the API is for convenience. That way you can decide if you want to save full entity into your repository or just do the partial update.