Do you have any examples capturing the results of a filtered grid into a collection with MVVM.
2 Answers, 1 is accepted
0
Vlad
Telerik team
answered on 15 Nov 2010, 04:44 PM
Hi,
You can easily achieve this if you bind the grid to QueryableCollectionView since the grid in this case will work directly with the collection FilterDescriptors.
Regards,
Vlad
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
Per your suggestion, I bound my grid to QueryableCollectionView. After the user applies the filter (via UI), I step through the code and find that the QueryableCollectionView has only the filtered collection items (Result Collection), which is good.
Now, my question is how do I
1) Apply LINQ operations on the Result Collection? ".Where" does not work
2) Cast the ResultCollection to SourceCollection Type? The only property i find is SourceCollection, which returns the entire sourcecollection. But, I want the ResultCollection type casted to the SourceCollection type. If do cast using "as" or put a type before ResultCollection, the code throws exception. "Cannot Cast"
Please suggest and provide a sample showing QueyableCollectionView using LINQ operations.