RowFilter with mamy-to-many relation ;-)

  • Thread starter £ukasz Margielewski
  • Start date
£

£ukasz Margielewski

I have two datatables: A wiht column: ID_A, NAME_A and datatable B with
columns: ID_B, NAME_B. Thiese tables binding third datatable C with columns:
ID_A, ID_B - standard many-many relation ;-)

And I have also combobox, which display displaymemebers from A datatable.

What the simplest way is to program combobox, to display only thiese rows
from datatable A which are combined with ID_B in the C table?
(As you guess, ID_B is a filter's parameter to filter rows displayed in
combobox)
 
S

Sahil Malik

Setup relations between these 2 tables. Then use GetChildRows and
GetParentRow to go over the relationships.

BTW - the above is very straightforward to implement if what you are trying
to do in a given many to many relationship is .. "For this row in A, tell me
what all matches in B".

However, if you are trying to do something like "Give me groups of A,B that
match with each other" that's a bit more involved since it requires a
reverse trip in the same fashion.

But from your description I think you are trying to first scenario.


- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
 

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