views:

347

answers:

1

Hi, in a WPF project with Linq to SQL, if you use the O/R - designer to create a simple structure with 3 that are all tied with forgin key relataions like so:

Customer <-- Orders <-- Items, and say i want a simpe window with 3 syncronized comboboxes when you select a customer you see only his orders and when you select an Order you see only the Items for that Order. all of this is simple....

Lets say i want to add filtering capablities to all the comboboxes. how would i do that if i want to use the entity objects from the LINQ dbml file?

Edit - Elaborating on filtering. i would like to filter the in memory collection without the need to query the database again, the filter can be a textbox that is over the combobox, that doest matter, my problem is that i cant filter the comboboxes because the are bound to an EntitySet through the L2S and dont implement filtering.

Thanks, Eric

+1  A: 

I would look into using CollectionViewSource. Bea Stollnitz has a good primer on it here and I used this blog post to show me how to filter. This will let you filter and sort without having to use the database and is pretty fast.

Bryan Anderson
This isnt what im looking for EntitySet implemetetion of IBindingLisView cannot filter. thats exactly the problem.