Multiple BindingSource on a Single Object

Multiple BindingSource on a Single Object

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


comp1mp posted on Wednesday, October 26, 2011

From Rocky:

"Data binding (especially in Windows Forms, which I assume you are using) imposes a whole other set of requirements. CSLA 4 helps somewhat with these, by enabling multiple bindingsource objects to bind to the same object in some cases. That wasn't possible prior to CSLA 4, because the IEditableObject implementation got confused."

 http://forums.lhotka.net/forums/p/9455/44806.aspx#44806

Does anybody know the "cases" in which this is supported IN CSLA 4?

Is this something that could be easily ported to 3.8?

 Thanks!

JonnyBee replied on Wednesday, October 26, 2011

Hi,

It's possible so long as you never call BeginEdit/EndEdit/CancelEdit on an object that is databound. This also means that you cannot use the CslaActionExtender as this assumes ownership of the BO and will Bind/Unbind the object on its own.

You can look at the actual changes I did for 4.0 here: http://www.lhotka.net/cslabugs/edit_bug.aspx?id=241

We have no plans to backport this into Csla 3.8 (at present). A

You should however probably only need to change:

Csla/BusinessListBase.cs and
Csla/Core/BusinessBase.cs

And you should focus on the changes in implementation of IEditableObject and #region Begin/Cancel/ApplyEdit methods.

 

comp1mp replied on Wednesday, October 26, 2011

Fantastic. Thanks Jonny!

Really impressed with the community. Hopefully I can someday help newbies in the manner I have been.

Copyright (c) Marimer LLC