This question is locked. New answers and comments are not allowed.
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.
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.