This question is locked. New answers and comments are not allowed.
Hello,
Exception Details: System.InvalidCastException:Unable to cast object of type'Telerik.Web.Mvc.CompositeFilterDescriptor' to type'Telerik.Web.Mvc.FilterDescriptor'.
Source Error:
Stack Trace:
I have some issues with filtering on 'custom' columns.
<%= Html.Telerik().Grid(Model) |
.Name("CustomerGrid") |
.Columns(columns => |
{ |
columns.Add(c => c.Id).Visible(false); |
columns.Add(c => c.Name).Title("Group Name").Width(200); |
columns.Add(c => (c.Comments ==null)?string.Empty : "View" ).Title("Comments").Width(70); |
foreach (Products p in products) |
{ |
columns.Add(c => (c.Products!=null && c. Products.Contains(t)) ? "V" : "X").Title(t.Value).Width(25); |
} |
}) |
.Ajax(ajax => ajax.Enabled(true).Action("GetCustomers", "Customer")) |
.Pageable() |
.Sortable() |
.Filterable() |
.Scrollable() |
In this example I wat to show 'comments' if customer has comments and 'x' or 'v' if he has certain products. The grid renders ok, but when I want to filter it does not work. Please refere to screenshots.
Does anybody have any idea why ?
The exception I'm having is:
Unable to cast object of type 'Telerik.Web.Mvc.CompositeFilterDescriptor' to type 'Telerik.Web.Mvc.FilterDescriptor'.
Description: Anunhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about theerror and where it originated in the code.Exception Details: System.InvalidCastException:Unable to cast object of type'Telerik.Web.Mvc.CompositeFilterDescriptor' to type'Telerik.Web.Mvc.FilterDescriptor'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[InvalidCastException: Unable to cast object of type 'Telerik.Web.Mvc.CompositeFilterDescriptor' to type 'Telerik.Web.Mvc.FilterDescriptor'.] DynamicModule.ns.Wrapped_CustomerController_2d423c8df8724f35b4b50c45780f24b9.Execute(RequestContext requestContext) +255 System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +7 System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__4() +34 System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21 System.Web.Mvc.Async.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) +12 System.Web.Mvc.Async.WrappedAsyncResult`1.End() +59 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +44 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +7 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8679150 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155 |