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

[Solved] Client filter issue

3 Answers 172 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.
Tetha
Top achievements
Rank 1
Tetha asked on 19 Oct 2011, 11:14 AM
Hi,
I have a grid with client filtering enabled.
If I have a filter condition like this

(agenziaID~eq~5)~or~((Comuni~substringof~'Busto arsizio')~or~(Comuni~substringof~'Castellanza'))

the filter is applied correctly.
If I add another clause like

(agenziaID~eq~5)~and~((Comuni~substringof~'Busto arsizio')~or~(Comuni~substringof~'Castellanza')~or~(Comuni~substringof~'Cantello'))

I receive 500 Internal server error.
The exact message tell
Expected RightParenthesis
It seems that client filter supports only 2 condition for field, because when I add the third condition to the filter I always receive error message.
Thank you in advance.

Mirko

3 Answers, 1 is accepted

Sort by
0
Tetha
Top achievements
Rank 1
answered on 25 Oct 2011, 02:54 PM
Hi,
I don't find a solution for the problem.
Anyone have an idea? 

This is the model
    public class RicercaRichieste
    {
        [Key]
        public int dettaglioID { get; set; }
 
        public string Cliente { get; set; }
 
        public string Telefono { get; set; }
 
        public string EMail { get; set; }
 
        public string Categorie { get; set; }
 
        public string Comuni { get; set; }
 
        public double? PrezzoMax { get; set; }
 
        public string Caratteristiche { get; set; }
 
        public string Note { get; set; }
 
        public int agenziaID { get; set; }
}

I'm using Telerik MVC 2011.2.715.
Thank you in advance.
Mirko
0
Tetha
Top achievements
Rank 1
answered on 03 Nov 2011, 05:53 PM
Hi,
this is the stack trace for the error.
[FilterParserException: Expected RightParenthesis]
   Telerik.Web.Mvc.Infrastructure.Implementation.FilterParser.Expect(FilterTokenType tokenType) +143
   Telerik.Web.Mvc.Infrastructure.Implementation.FilterParser.ParseNestedExpression() +71
   Telerik.Web.Mvc.Infrastructure.Implementation.FilterParser.PrimaryExpression() +54
   Telerik.Web.Mvc.Infrastructure.Implementation.FilterParser.ComparisonExpression() +36
   Telerik.Web.Mvc.Infrastructure.Implementation.FilterParser.AndExpression() +36
   Telerik.Web.Mvc.Infrastructure.Implementation.FilterParser.OrExpression() +41
   Telerik.Web.Mvc.Infrastructure.Implementation.FilterParser.Expression() +31
   Telerik.Web.Mvc.Infrastructure.Implementation.FilterParser.Parse() +52
   Telerik.Web.Mvc.Infrastructure.FilterDescriptorFactory.Create(String input) +111
   Telerik.Web.Mvc.UI.GridDataProcessor.get_FilterDescriptors() +104
   Telerik.Web.Mvc.UI.GridDataProcessor.EnsureDataSourceIsProcessed() +574
   Telerik.Web.Mvc.UI.GridDataProcessor.get_ProcessedDataSource() +29
   Telerik.Web.Mvc.GridActionAttribute.OnActionExecuted(ActionExecutedContext filterContext) +514
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +283
   System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +263
   System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +191
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37
   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() +62
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +50
   System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
 
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8963149
 
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

The error appears for all the fields in which the filter has more than two clauses. Please I need help because this error is blocking the project.
Thanks in advance.
Mirko
0
Wicky
Top achievements
Rank 1
answered on 21 May 2012, 07:10 AM
Hi,

This issue is still existed in 2012 Q1 !? ...

Regards
Wicky


Tags
Grid
Asked by
Tetha
Top achievements
Rank 1
Answers by
Tetha
Top achievements
Rank 1
Wicky
Top achievements
Rank 1
Share this question
or