BusinessBindingSource creates mutliple BOs


Author
Message
George Nentidis
George Nentidis
StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 reputation)StrataFrame User (136 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 (84 views, 1.00 MB)
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