I don't know if this is actually a problem or not but I though I should ask.
The BusinessBindingSource object seems to create its own instance of the BO to which it is bound to, instead of using the one in the form. It started like this: I drop my BO to the form and connect it to the BusinessBindingSource which I also drop on the form. Then bind some controls to it. By placing breakpoints to the constructors of the BO I have found out that the BusinessBindingSource creates another instance of the BO and modifies that one. This causes the FieldPropertyChanged events of the object that is dropped on the form not to be called, since it is another object that is changing.
I have tried to reproduce this using the BussinesBindingSource that comes with the framework. I have placed a breakpoint in the CustomersBO constructor, and found out that it is called 100 times. One for each row of the query. Is this ok?
If this is ok, (perhaps you're using a shared table) then is there a way I can make the FieldPropertyChanged of the BO that is dropped on the form to be called?
I have attached the BussinesBidingSource project, even though I know you already have it. I have only added a counter in the constructor to count the calls.
Thank you.
Yes, this is OK. The BBS wraps the instance of the BO that you select. The IBindingList interface expected a unique instance of an object for each....that is why you saw the contructor fire 100 times. But there is no query logic inside of those created instances and the wrapped BO is translated into each row instance...giving the IBindingList interface and grids the interface they like while still only maintaining a single BO instance (again, the one that you have wrapped).
Sure. The BO that you have wrapped still respects all of the logic to which that BO is created. So if you create a field changed event, then it will still get raised.
Hope that makes sense