IEditableObject and cancelling changes...
Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1317
Printed Date: 17-Jun-2025 at 12:38pm
Topic: IEditableObject and cancelling changes...
Posted By: jsobell
Subject: IEditableObject and cancelling changes...
Date Posted: 10-Jun-2009 at 3:58pm
We're using a DataForm to edit an instance of a row in a BindableCollection, and I have a question regarding the suggested edit method due to some unexpected behaviour. We have a command on the listbox that calls a child form, passing in the instance of the entity from the collection. This form displays the entity in a (SL3) DataForm, so we start edit mode. Changes to this entity are then reflected as we edit it in the underlying listbox (obviously, as it's databound). However, if we then click Cancel in the dataform the changes are not reflected in the bound control. My guess is that the implementation of IEditableObject.EditCancel does not call any property changed events, so the bound components don't realize the properties have changed back. Could this be correct?
Cheers, Jason
|
Replies:
Posted By: kimj
Date Posted: 10-Jun-2009 at 4:45pm
Yes, you're correct, the CancelEdit does not currently raise any property changed events. We'll open a defect report to address this. Thanks for bringing it to our attention.
|
|