Multiple BindingSources, DisableIEditableObject and CSLA 3.8.x

Multiple BindingSources, DisableIEditableObject and CSLA 3.8.x

Old forum URL: forums.lhotka.net/forums/t/11478.aspx


comp1mp posted on Monday, July 16, 2012

Hello,

I have backported the changes necessary to support multiple binding sources on a single object to CSLA 3.8.3 source.

It is still a mighty struggle when dealing with a complex object graph. In fact the Multiple BindingSource sample in 4.0 has a logical bug which further confuses the issue of proper implementation. (I will make a separate post reporting that)

After further reading, I determined that I would try using DisableIEditableObject. My project does not need N Level Undo.

My experience has been surprising. It appears from my proof of concept work, this is by far the easiest way to work with multiple binding sources in a complex object graph, at least for 3.8.x

I just want to make sure I am not missing something.

Per Rocky from a post long ago.

"The specific rule is that you should never call the *Edit() methods on the business object while it is data bound to a bindingsource."

Does this rule apply if I am using DisableIEditableObject set to true in my objects?

Does this rule only apply to root objects?

I have child objects in a list that are each bound to an there own instance of a BindingSource contained in a custom control. I do not unbind them when I call Root.ApplyEdit() or Root.CancelEdit() and it seems to work fine.

AM I missing a possible gotcha by not unbinding the child objects?

Copyright (c) Marimer LLC