I have a Silverlight master-details DataForm
where the DataForm represents a street address.
When I edit the Address1
textbox, the value gets automatically committed to the bound Address
object once focus leaves the textbox.
If I hit the Cancel
button, then any changes are undone because Address
implements IEditableObject
and saves its state.
The problem is that since any change is immediately propagated to the underlying object it will be shown in the master grid before the user has actually hit Save
. I also have other locations where this data is shown. This is not a very good user experience.
I've tried OneWay
binding but then I can't commit back without manually copying all the fields over.
The only thing I can think of doing is to create a copy of the data first or using OneWay
binding, but they both seem a little clumsy.
Does DataForm
support this way of working?
The copy of the object feels a little clumsy, but I would use that: it's coming back into style with systems like ASP.NET MVC.
You then also have a good opportunity to do any level of validation you want before commiting it to what will be propagated to other bound controls.