Hi there
I have successfully set up llblgen to represent my data structure, I am using the self servicing adapter and vb.net 2005.
It looks like this:
Bill to Organization (A)
|
Subscription(s)
|
|----------------------|
Bill To Org Ship to Org
I load the organization(A) and the relationships work out so I can look at SubBillTo, and get a collection of subscriptions that belong to the organization. If I look at BillToOrg.SubBillto(10) (10th row in the collection) I get properties "ShipToOrg" which is the child collection, and describes the Organization related via the "ship to" relationship. All looks happy. I can pop this relationship up with a devexpress grid, and it displays all the levels, and I can navigate, save, etc.
Now for the tough part: The actual data entry needs to happen on a form with fields. I have setup the databinding and it works for the Organization(A) side, and it works for the Subscription. What I can't figure out how to do is bind the related organization from the "ship to" level, the grand child.
This is how the subscription is bound:
Me.txtRecSubscriptionID.DataBindings.Add(New Binding("Text", OrgSubscriber.SubBillTo, "SubscriptionId"))
Me.txtRecRecipient.DataBindings.Add(New Binding("Text", OrgSubscriber.SubBillTo, "Recipient"))
What I think I want to do is bind the text fields to the subscriber "ship to" organization information. This is what I tried:
Me.cmbRecZip.DataBindings.Add(New Binding("Text", OrgSubscriber.SubBillTo.organization, "Zip")) ' HERE, how to get this relationship?
In debug mode, I can print OrgSubscriber.SubBillTo(1).OrgDeliverTo.Zip and see the zip code. Can someone give me a tip as to how I could bind this text box to the entity?
Thanks!