Single Datagrid, Master/Detail, Rowfilter by string child value

  • Thread starter Thread starter James Morton
  • Start date Start date
J

James Morton

Ok it appears that when using the Child() to access values in the child rows
you MUST you an aggreggate function.

I want to filter my master record based off a string value in a child row.



dvSource = new DataView();

dvSource.RowFilter = Child(ChildDataRelation).ChildColumn;
//ChildColumn of DataType String
//wont work, will only work with aggreggate functions (SUM,COUNT, etc)



The string value is UNIQUE in the child rows and the relationsship is
many-to-many between parent and child (i.e. there is a mtm table), this is
not somewhere i can use an aggreggate function.

I am starting to think of some pretty drastic ways around this and am hoping
someone has a good method for doing this.
 
I got around this by using either the MIN() or MAX() aggregate functions
which return a single value unchanged. Works with strings also. It seems like
this should not work but it's working in my application.
 
Back
Top