Editable Child of Business Base Binding Issue

Editable Child of Business Base Binding Issue

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


IanK posted on Thursday, August 14, 2008

I have a number of Business Objects which contain editable Children without being items on a Business List. When I Create a BindingSource object on a windows forms to the Editable Child BO and set the Source to the Root BO only Business List Objects within it appear as DataMembers, none of the editable Children Objects. Is something like an Interface missing from the Editable Child base object which would enable this facility?

I know I can get around it by binding directly to the Business Tier object in code.

Example. 

 I have an address table containing all address for various Companies.

A Company Object then has a primary address (Single Editable Child) and a list of alternative addresses (BusinessListBase). If I create an Address Binding source on a Windows Form and set its DataSource to CompanyBindingSource The Datamember List will List the Alternative Address List Property but not Primary Address Property?

I also note if I implement my UI by letting one binding source reference another this appears to dramatically degrade my response times as opposed to when I set the datasource on businesslist within a Editable root object explicitly.

 

Any help much appreciated.

RockfordLhotka replied on Friday, August 15, 2008

I don't think the scenario you describe is actually supported by the designer in Windows Forms.

They assume that everything is a collection (like a DataTable). So even if you give it a single object, the bindingsource wraps that object with a list so it is operating on a list of one object.

Since your child property isn't a list, I think they get confused and don't handle the scenario, leaving you to make up the difference in code.

IanK replied on Monday, August 18, 2008

Thanks for response Rocky.  That clears that up for me, I thought I might have miss coded something.

Copyright (c) Marimer LLC