This is a migrated thread and some comments may be shown as answers.

QueryableCollectionView FilterDescriptors CollectionChanged event not firing

1 Answer 212 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 01 Mar 2016, 05:43 PM

We have a standard WPF MVVM project.  In one view model we have a QueryableCollectionView to which a radgridview is bound.  When the user filters the grid we had expected the QueryableCollectionView.FilterDescriptors.CollectionChanged to be fired but nothing is happening.  When we inspect the FilterDescriptors through visual studio we can see the collection is present.  Is this binding incorrect or am I missing something else?

Any help appreciated:

 

DisplayTrades = new QueryableCollectionView(displayTradeSource, typeof(TradeViewModel));
DisplayTrades.FilterDescriptors.CollectionChanged += CollectionChanged_Event;

private void CollectionChanged_Event(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
           throw Exception("test");
}

 

 

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 02 Mar 2016, 12:43 PM
Hello Chris,

I tried to reproduce such issue on my end, but to no avail. Can you please check the attached project?
You should notice, that when the user performs a filtering operation, the FilterDescriptors collection of the QCV raises the CollectionChanged event as expected. Am I missing something?

Can you please also shed more light on the need to use the QueryableCollectionView in such manner? Basically, RadGridView exposes Filtering/Filtered events from which you can benefit instead of using the FilterDescriptors.CollectionChanged event.

Best Regards,
Stefan X1
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Chris
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or