Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7697815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:05:53+00:00 2026-05-31T22:05:53+00:00

I got 3 listviews. The itemsources is bound to an ObservableCollection the person class

  • 0

I got 3 listviews. The itemsources is bound to an ObservableCollection the person class has an integer property(with INotifyPropertyChanged) “teamID”. Now I want to filter the listviews depending on the team they are in, is there a way to do it easy(I know 2 solutions for it but I think they are not good, 1 is to make 3 ObservableCollection but that will be complex to keep track and transfer all the persons to the right ObservableCollection , or use a trigger like Visibility to Visible if the teamID is the right teamID^^)
I got 3 buttons and if I select an item(person) on any of the listviews, depending on the button clicked that person teamID will change. (But I also want him to change to the right listview depending on teamID)

Hope you understand, otherwise feel free to ask for more details.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:05:54+00:00Added an answer on May 31, 2026 at 10:05 pm

    I think It is not possible to do it without writing some code.

    I would use CollectionView instead of binding the collection directly to the ListView. This is what WPF will do internally, but creating them by your own you will have control to many things like sort and of course filters.

    Create them using CollectionViewSource.GetDefaultView(yourCollection).

    Apply the filters and on the setter of your team id property do a CollectionView.Refresh() when team id changes. If you don’t have too many data this is not a big issue. But on a lot of data Refresh() on three views might be a little heavy.

    EDIT:

    I forgot to tell you that you must set the source on each one of your ListViews to the corresponding CollectionView but I think this is obvious.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I´ve got a ListView which is bound to the ObservableCollection mPersonList. The Class Person
Atm I got a class(somerandomclasss) with a static ObservableCollection: public static ObservableCollection<PersonViewModel> thepeoplelist =
I've got a ListView control bound to an ObservableCollection of items, and I've set
In my View I got a ListView bound to a CollectionView in my ViewModel,
I have got a StartCommand Class: public class StartCommand : ICommand { public void
I've got a simple ListView which pulls data from an ObservableCollection and I'm using
I've got a main WPF window: <Window x:Class=NorthwindInterface.MainWindow xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml xmlns:ViewModels=clr-namespace:NorthwindInterface.ViewModels Title=MainWindow Height=350 Width=525>
So I've got a pretty basic ListView, that has two columns. Sample code below:
I have Listviews within layouts and I want the user to know that there
I want to be able to convert an integer to a string using a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.