Filtering is broken for some values... again

3 posts, 0 answers
  1. iCognition
    iCognition avatar
    66 posts
    Member since:
    Apr 2012

    Posted 17 Mar 2016 Link to this post

    I've reported this before on the forum and through support tickets.

    If you have a grid column with the name "Fields[3].Value" Kendo throws an exception unnecessarily when trying to filter on it.

    This can be fixed by adding a period to the list of accepted characters in the FilterLexer. I've done this myself a few times and I'm a bit tired of having to rebuild it every time Kendo gets updated...


    Expected token
    at Kendo.Mvc.Infrastructure.Implementation.FilterLexer.Tokenize()
       at Kendo.Mvc.Infrastructure.Implementation.FilterParser..ctor(String input)
       at Kendo.Mvc.Infrastructure.FilterDescriptorFactory.Create(String input)
       at Kendo.Mvc.UI.DataSourceRequestModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
       at System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor)
       at System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__19(AsyncCallback asyncCallback, Object asyncState)

  2. iCognition
    iCognition avatar
    66 posts
    Member since:
    Apr 2012

    Posted 20 Mar 2016 in reply to iCognition Link to this post

    namespace Kendo.Mvc.Infrastructure.Implementation
        using System;
        using System.Collections.Generic;
        using System.Text;
        public class FilterLexer...
            private static bool IsIdentifierPart(char character)
                return char.IsLetter(character) || char.IsDigit(character) || character == '_' || character == '$' || character == '[' || character == ']';
  3. Rosen
    Rosen avatar
    3247 posts

    Posted 23 Mar 2016 Link to this post

    Hello Matt,

    Such expression (which uses indexer) is not supported for filtering as it may not be translated by the QueryableProviders. If this is working on your side I suspect that the processing is done in-memory (using LinqToObjects).

    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 Feedback Portal and vote to affect the priority of the items
Back to Top