Parent/Child Relation

  • Thread starter Thread starter Katty
  • Start date Start date
K

Katty

An owner can have multiple pets and a pet can have multiple owners. I
understand that you
must have a cross reference table between owners and pets to handle the many
to many relationship

So, I created a DataSet with tables for Owner, OwnerPet and Pet where
OwnerPet is the cross reference containing OwnerId and PetId. Then I created
relationships between Owner and OwnerPet and between Pet and OwnerPet.

Now when I bind this to a DataGrid, I open Owners and I can see the OwnerPet
cross refference records, but can't get to Pets, and visversa.

Any ideas on how to sove this problem?

Thanks!
 
there should be commandbutton/radiobutton control. which selects how you
want to go. owners->ownerspet->pet or pet->ownerspet->owners.

write in post whether I understood your question properly or not.

Rajesh Patel
 
I can go to owners->ownerspet->pet, but can't show owners-> pet on the
Datagrid by clicking the
plus simbol (+). Is there a direct way of doing this with a DataRelation?

I mean, i don't need to show owners->ownerspet on the datagrid, but show
owners->pet
 
Back
Top