Binding Using DataRelation

  • Thread starter Thread starter Jerry
  • Start date Start date
J

Jerry

I'm having a problem creating a binding based on a DataRelation. Here's an
excert from the .NET Framework Class Library that defines the context of my
question:

"... if the DataTable named "Suppliers" contains a DataRelation named
"suppliers2products", the data member could be
"Suppliers.suppliers2products.ProductName".

Should I also be able to navigate this relationship in the reverse
direction, e.g. Products.suppliers2products.SupplierName?

So far in my case I have not. The error I get is "Cannot create a child list
from 'relationship name'." Where the 'relationship name' in this example
would be 'suppliers2products'. I've tried creating a new relationship, e.g.
'products2suppliers' which I can successfully navigate for the binding but
it creates a unique key constraint that's unacceptable (even though I
specified false when creating the relationship). Can the DataRelation only
be navigated from the parent to the child tables?

You assistance is greatly appreciated.
Jerry
 
Could you provide a sample to reproduce the issue?

Best regards,

Duke Sun
Microsoft Online Partner Support
<MCSE/MCDBA/MCSD>

Get Secure! ¨C www.microsoft.com/security
This posting is provided ¡°as is¡± with no warranties and confers no rights.
 
Back
Top