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

[Solved] Grid MVVM and FilerDescriptors

3 Answers 116 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.
Steve
Top achievements
Rank 1
Steve asked on 05 Jul 2011, 02:30 AM
I need to be able to dyamically change the FilterDescriptors collection in a RadGridView from my View Model.  I don't see any way to bind to FilterDescriptors or get access to the collection from my View Model.  I could add all of the possible filters in the xaml but I don't see a way to disable them and it doesn't make since to have to change all that aren't active to alway to true.

I'm sure this isn't as hard as I'm making it.

Maybe this is the wrong approach, I have a page with several drop down list that when selected cause the grid to filter the given column with the data selected in the drop down- simple enough but causing me stress...

Help would be much appreciated.

Thanks,
Steve Hatch

3 Answers, 1 is accepted

Sort by
0
Steve
Top achievements
Rank 1
answered on 05 Jul 2011, 02:39 AM
One more thing, I cannot use the default column filtering (IsFilterable="True") because most of the columns are GridViewComboBoxColumns and the default filtering displays the key value for the column, not the display value.  Hence, when the user clicks the filter icon they get a list 1,2,3,4,5, etc instead of the display equivalint.


Thanks again,
Steve Hatch

0
Accepted
Vlad
Telerik team
answered on 05 Jul 2011, 06:54 AM
Hello,

 You can use QueryableCollectionView in your view model to achieve this. The grid will automatically respect any filter, sort, group, etc. modification if bound to QueryableCollectionView.

Regards,
Vlad
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
0
Steve
Top achievements
Rank 1
answered on 06 Jul 2011, 01:51 AM
That did it, Thanks!
Tags
GridView
Asked by
Steve
Top achievements
Rank 1
Answers by
Steve
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or