Slightly late to the party, but I am glad you got it to work.
I've been a bit inactive here lately, but I will come back soon as my
daytime job lets me to .. LOL
- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
"Carolina" <(E-Mail Removed)> wrote in message
news:1F8F5D3B-79F7-4605-BA3F-(E-Mail Removed)...
> I managed to solve this with help from a colleague at work!
>
> The solution that worked for me is brilliantly simple: filtering on parent
> criteria can be done using "parent.field" on the child's
> defaultview.rowfilter property.
>
> For example: myds.Orders.DefaultView.RowFilter = "parent.City='Stockholm'"
>
> Thank you Ashish and Sahil for trying to help me!
>
> "Carolina" wrote:
>
> > Hi all!
> >
> > I am trying to apply a filter to a table in a dataset using criteria
from a
> > parent table, but I have no luck so far.
> >
> > Having a dataset with tables for Customers and Orders, and a relation
> > between them, I wish to find the highest order for customers in a
specific
> > region. Creating a view for Customers filtering them to only display
> > Customers in Region='A' is no problem, but as I try accessing Orders, it
is
> > not filtered and so I have no way of finding the most expensive order
for the
> > region 'A'. Just using the same criteria on the dataview for Orders does
not
> > work, neither "Region='A'" nor "Customers.Region='A'" can be applied to
the
> > Orders table.
> >
> > I am actually not interested in displaying this information, I need to
use
> > values from the filtered version of Orders for extensive calculations
and
> > aggregations, so attaching my dataset/tables/views to any userinterface
> > components won't help.
> >
> > Any ideas greatly appreciated!
> >