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

[Solved] ICollectionView support

1 Answer 94 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kakone
Top achievements
Rank 1
Kakone asked on 26 Feb 2010, 03:29 PM
Hello,

I try to bind the RadGridView with a collection that implements ICollectionView interface (I don't want to use your QueryableCollectionView because I don't want that my ViewModel depends on third-party libraries).
For SortDescriptions and GroupDescriptions properties of my CollectionView object, it works. But, when I sort a column that is in the group header of the RadGridView, the grouped column is not added to the SortDescriptions property of my CollectionView object.

And I don't know how I can filter the data without using your QueryableCollectionView.

Cordially,
Stephane.

1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan Dobrev
Telerik team
answered on 04 Mar 2010, 09:16 AM
Hello Stéphane,

When you sort the groups actually you are sorting them by their Keys, not by the column in the flat collection the grid is bound to. There is no built-in way to sort the groups using PropertyGroupDescription class, because it did not have the notion of sort direction.

Regarding the filtering you can use the Filter property of the ICollectionView. Unfortunately this property does not allow flexible composition of declarative filters. This is definitely an area where Microsoft can provide a better solution and actually they have implemented something similar with the filter descriptors of the DomainDataSource's control in WCF RIA Services. What you can currently do is to convert the filter descriptors that RadGridView creates to executable predicates in order to set them on the collection view. However this approach is less than optimal.

Sincerely yours,
Stefan Dobrev
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Kakone
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
Share this question
or