BusinessBindingSource creates mutliple BOs


Author
Message
George Nentidis
George Nentidis
StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)StrataFrame User (168 reputation)
Group: Forum Members
Posts: 72, Visits: 251
Hello again.

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.

Attachments
BusinessBindingSource.rar (99 views, 1.00 MB)
Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Have you register this as a bug?

At present, the BBS does not bubble up the changed events.  This is a bug (of sorts) and we will make a change, but it will not be included in the 1.6.5 release.  This will require some core level changes and is something that can have down-stream effects, so this will be a change in the next update after the 1.6.5 build which is close to its final release state.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search