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

  • Home
  • SEARCH
  • 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 3272214
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:48:11+00:00 2026-05-17T18:48:11+00:00

Using .NET 3.5, I’m finding that a CollectionView with a filter doesn’t update when

  • 0

Using .NET 3.5, I’m finding that a CollectionView with a filter doesn’t update when the underlying ObservableCollection(T) has items moved using ObservableCollection(T).Move. As a sanity check, I started with a simple project, one of Bea Stollnitz’ from this page: http://bea.stollnitz.com/blog/?p=31. The actual project can be downloaded here: bea.stollnitz.com/files/28/FilterSample.zip. If you go into her Window1.xaml file and add a button like this:

<StackPanel>

         <Button Content="Blah" Click="Button_Click"/>

and then add the click handler like this:

      private void Button_Click(object sender, RoutedEventArgs e) {
GreekGods src1 = this.Resources["src1"] as GreekGods;
         src1.Move(0, 1);
      }

You’ll find that pressing the button does not result in any change in the window. However, if you comment out the line of code in her constructor:

     collectionView.Filter = new Predicate<object>(FilterOutA);

and then press the button, you’ll see the two top elements swap position.

So what am I missing? Is this a bug, or does CollectionView just lose this functionality when you apply a filter? I can understand if you’ve got the CollectionView sorted, then changing the underlying order wouldn’t change the CollectionView’s order, but that’s not true here. Shouldn’t just having a Filter on the CollectionView continue to show the underlying ObservableCollection’s order and update as it changes?

Thanks,
Kevin

  • 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-17T18:48:12+00:00Added an answer on May 17, 2026 at 6:48 pm

    No, it’s not a bug and is working perfectly. See, in that example, here’s the order of items in the source collection:

    [0] Venus
    [1] Apollo
    [2] Mars

    Now, if you apply “FilterOutA”, “Apollo” will be removed and thus the listbox will just show:

    [0] Venus
    [1] Apollo <-Filtered out
    [2] Mars

    Given this, calling src1.Move(0,1) will essentially move “Venus” to index 1. Thus, in the filtered collection, it will appear like nothing changed.

    [0] Apollo <-Filtered out

    [1] Venus
    [2] Mars

    The thing to note here is that the Move() method works on the original collection and not the filtered one.

    Try changing the move operation to src1.Move(0,2), and you’ll see the UI update.

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

Sidebar

Related Questions

Using .NET 1.1, I have a DataGrid that contains three columns for each row.
Using .NET (if I have to use pInvoke or managed C++, that's fine too),
Using .Net (C#), how can you work with USB devices? How can you detect
Using .Net 3.0 and VS2005. The objects in question are consumed from a WCF
NOTE: Using .NET 2.0, and VS2005 as IDE Hello all, I'm working on logging
I am using .NET remoting to retrieve periodic status updates from a Windows service
I am using .NET Remoting. My server/hoster is a Windows Service. It will sometimes
I'm using .NET 3.5. I have two string arrays, which may share one or
I am using .Net 2 and the normal way to store my settings. I
Ever since I started using .NET, I've just been creating Helper classes or Partial

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.