I'm using a DataForm in Silverlight 4. Several DataForms, actually, and they share a common RIA Services context. Here's the problem I'm having...
If I start editing a DataField in one of the DataForms, then click on a button that calls Context.SubmitChanges(), I get the following error:
�Entity 'foo' is currently being edited and has uncommitted changes. A call to BeginEdit must be followed by a call to EndEdit or CancelEdit before changes can be submitted.�
Note that the "Submit Changes" button is external to the DataForms and applies to the RIA Services context that is shared between the DataForms (which are each in separate tabs of a tab control).
I'd like to be able to avoid this problem by detecting, in code, when a DataForm is in editing mode. When I'm in debug mode, I can see that the DataForm has properties such as "IsEditing" and "CanCancelEdit" that indicate that it is in editing mode, but these properties do not seem to be available for use in my code.
Any ideas?