This question is locked. New answers and comments are not allowed.
I extended the GridView Commands example by using a ViewModel behind and binding the GridView to a QDSCV in the VM. So far this is working as expected. A new row is added to the QDSCV by calling RadGridViewCommand.BeginInsert- fine. The example stops at the point where I want to persist the data to a database.
The problem is when calling RadGridViewCommands.CommitEdit or RadGridViewCommands.CancelRowEdit. Since these two commands just do a "CommitEdit/New" or "CancelEdit/New" but no "SubmitChanges" or "RejectChanges" I have to find a place where to "hook in" and add this code. On the VM side I don't know how to distinguish between commiting and cancelling the edit mode. I tried to check the PropertyChanged event of QDSCV but both CommitEdit and CancelRowEdit set CurrentAddItem to NULL and IsAddingNew to false. Any hints where to start?
Regards
Neils
The problem is when calling RadGridViewCommands.CommitEdit or RadGridViewCommands.CancelRowEdit. Since these two commands just do a "CommitEdit/New" or "CancelEdit/New" but no "SubmitChanges" or "RejectChanges" I have to find a place where to "hook in" and add this code. On the VM side I don't know how to distinguish between commiting and cancelling the edit mode. I tried to check the PropertyChanged event of QDSCV but both CommitEdit and CancelRowEdit set CurrentAddItem to NULL and IsAddingNew to false. Any hints where to start?
Regards
Neils