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

Filterdescriptor problem

1 Answer 138 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Doug
Top achievements
Rank 1
Doug asked on 08 Mar 2010, 07:00 PM
I'm using custombinding on my telerik mvc grid and doing my own sorting/filtering/paging.

Everything works as expected when I have one column being filtered

foreach (FilterDescriptor filter in command.FilterDescriptors)
{
...
}
 
When I add another column to the filtering I get
Unable to cast object of type 'Telerik.Web.Mvc.CompositeFilterDescriptor' to type 'Telerik.Web.Mvc.FilterDescriptor' on the foreach line listed above.

And sure enough the first element of command.FilterDescriptors is a CompositeFilterDescriptor vs a FilterDescriptor when there's only 1 column being filtered.

I've attempted to test for it and work around it and with a little more effort could figure it out, but I'm thinking its a bug and should be fixed.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 09 Mar 2010, 09:48 AM
Hello Doug,

Please review this forum thread devoted on the same matter.

All the best,
Georgi Krustev
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
Grid
Asked by
Doug
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or