Hi All
I'm positive this has to be a very simple thing to do. I'm very new to vb.net and I'm having a bit of fun with binding at the moment.
Take the standard Customers/Contacts relationship. There is a form for each entity but on the contacts form I want to show the name of the customer. I want it to be a part of the Binding Context for the form so when the user chooses another contact, the Customer name is kept in sync.
The datasouce for my Binding context is a dataview of the Contacts table. I can quite happily bind to the Contact's children tables using the relationship name as a part of the binding statement ie:
I can't use the relationship from the child to get to the parent though, and I can't see any other way of binding to the parent (apart from catching the CurrentChanged event of the Binding Context, getting the parent, and then outputting the value onto the form - which is not ideal for me).
This seems like a truly basic task... I just can't seem to figure it out. Any help would be greatly appreciated!!!
Many thanks
Nells
I'm positive this has to be a very simple thing to do. I'm very new to vb.net and I'm having a bit of fun with binding at the moment.
Take the standard Customers/Contacts relationship. There is a form for each entity but on the contacts form I want to show the name of the customer. I want it to be a part of the Binding Context for the form so when the user chooses another contact, the Customer name is kept in sync.
The datasouce for my Binding context is a dataview of the Contacts table. I can quite happily bind to the Contact's children tables using the relationship name as a part of the binding statement ie:
Code:
Add New Binding("Text", ContactsDataView,"[RelationshipName].[ColumnName]")
I can't use the relationship from the child to get to the parent though, and I can't see any other way of binding to the parent (apart from catching the CurrentChanged event of the Binding Context, getting the parent, and then outputting the value onto the form - which is not ideal for me).
This seems like a truly basic task... I just can't seem to figure it out. Any help would be greatly appreciated!!!
Many thanks
Nells