What is the point of Relations?

R

RDA

So in VS 2008 I have created an XSD file with a master table and a
child table bound by a relation. I have bound the master table to a
datagridview. However, I have no clue how to access the child table
(yet have it relate to the master table via the relation).

So, in short, what is the point of Relations? How can I access them?
Common sense tells me it should be easy to create a "nested
datagridview" or something to display the child table within the
master datagridview, but this is not straightforward.

Please help!
 
M

Miro

It does like an automatic filter for you when you use the controls on a form
for example.

Are you looking for an example on how to display a master - detail using a
relation?
 
M

Miro

Think about this scenario

Lets say you have a master file and a detail file.
2 datagrids on a form.

You select * from master and select * from detail

in this scenario, if you have a relation, and the datagrids are setup to
link through the relation, as you select one record in the master, the
detail filters to be the records linked to the master.

Setting up the relation with "cacading updates and deletes" also delets the
child records for you
(providing they are loaded into your dataset).



YES. Please. :)
 

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