troubleshooting Question

How to filter out duplicate items using MVVM

Avatar of ichikuma
ichikumaFlag for United States of America asked on
Microsoft Development.NET Programming
5 Comments1 Solution578 ViewsLast Modified:
I'm trying to use one DataContext (ViewModel) to load my data once, and then use it in three different views.  I have it working for two of my views but the third one is my problem case.  Here's what I'm dealing with.

I have an ObservableCollection of Events, that contain EventDetails which contains a list of participants.
public class Events: ObservableCollection<EventDetails>

public class EventDetails : ObservableCollection<Participants>
The first two views are easy, the first view is just a list of Event->Name.  The second view is also pretty simple, it's the list of Events->Details->Participants in a TreeView.  The third view is much more difficult.  I want to display all of the Names of the Participants from all of the events but only showing 'unique' ones, no duplicates and put them in a ListView.

Is there a way to somehow use databinding while filtering out duplicate data?

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros