I have a object that implements the IEditableObject interface exposed on a viewmodel bound to a Silverlight page.
How/Where do I call the BeginEdit, CancelEdit and EndEdit methods? How can I constrain only objects implementing this interface to my page?
I am NOT using DataGrid or DataForm controls. I am using Label, TextBox and DescriptionViewer controls to display the data for editing.
I know this is an old thread (but for the sake of future use…)
I do it this way:
whenever the current item (for instance of a CollectionViewSource) changes this is done:
Whenever i want to save (the current item) i do this:
Whenever i want to cancel (current changes) i do this:
Hope it helps someone in the future!