Filtering the view of a dataset

  • Thread starter Thread starter =?ISO-8859-1?Q?Mika=EBl_PLOUHINEC?=
  • Start date Start date
?

=?ISO-8859-1?Q?Mika=EBl_PLOUHINEC?=

Hello,

I have a dataset with 2 DataTables : Groups and Persons. I make a
relation between this 2 DataTables using one DataColumn in each
datatable. Finally I use this dataset in a dataGrid. So I would like to
have a display like :

groupe1
groupe2
+ (person1)
+ (person2)
groupe3

Everything is ok.

But if I want to filter my query on person (for example birthday), My
gid display all groups and only the person corresponding to my filter.

I would like to know if there is a way to display only groups which
correspond to filter persons (if a group doesn't have persons
corresponding to my birthday filter, I don't want to display this group).

Does someone have got any idea?

Thanks a lot.

Mike
 
Collect group ids from filtered persons and use them to filter (ID IN
(....)) dataview that you are using to display groups (usually this is
grouptable.DefaultView).
 
Back
Top