Parent/Child Relation

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!
 
R

Rajesh Patel

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
 
K

Katty

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top