Home All Groups Group Topic Archive Search About

Filtering relational dataset tables by parent record

Author
22 Feb 2007 7:12 PM
dentyne
Good morning,

[Cross post in Csharp group before I knew adonet group existed]
I have a typed dataset with 10 relational, hierarchical tables.  I
want to be able to "filter" all the dataset tables based on one
parent
record.  For instance, let's say I have a dataset that with 10 tables
that contain information about all of the 40 some odd U.S.
presidents.  The main parent table would be the "President" table.
The child, grandchild, great-grandchild etc. tables may include
countries the president visited, places he lived, children he had and
where they lived, etc.  I want to be able to do something like
"Filter
the dataset by LastName='Lincoln'", and then the dataset tables would
just contain all records corresponding to Abraham Lincoln.


I studied the DefaultView and the GetChildRows, but it doesn't seem
to
give me what quite what I want, unless I am doing it wrong.


I guess I just want a filtered dataset. Using the example above, I
could filter by Abraham Lincoln and easily populate my controls.  The
user can change the data, and refresh the page then I could show a
different president, etc.  When it's all over I send my dataset out
for update.


Thanks for the help.

AddThis Social Bookmark Button