How can I call a MVVM command after an editable cell has been changed?
I would like to update a label outside of the grid with the sum of one of the grid's columns
Hello PMac,
In order to call an MVVM command after an editable cell has been changed in the XamDataGrid, I would recommend that you include the System.Windows.Interactivity assembly and utilize an EventTrigger with an InvokeCommandAction. You can read about these classes here: https://github.com/Microsoft/XamlBehaviors/wiki/InvokeCommandAction.
In the EventTrigger, you can target the EditModeEnded event of the grid by setting the EventName property of the EventTrigger to "EditModeEnded", as this will fire whenever a cell in the grid leaves edit mode. Then, you simply need to bind the Command property of your underlying ViewModel to the resultant InvokeCommandAction.
I have attached a sample project to demonstrate the above. I hope this helps.
Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate Developer