Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Grid > Grid MasterTableView FilterExpression is blank on Special Chars like (%,[,],",<,>,,...) is passed from google like filtering

Not answered Grid MasterTableView FilterExpression is blank on Special Chars like (%,[,],",<,>,,...) is passed from google like filtering

Feed from this thread
  • Posted on Apr 26, 2010 (permalink)

    Hi,
        We have an issue for GooleLike Filtering, we have a GoogleLike Filtering when we type special charcters like %,[,],<,> ...etc then the GoogleLike Filtering is not working. I drilled down to deep and found that when we pass normal text to column then the FilterExpression is getting formed as needed and Filtering working as desired, But When we pass and the text  with some special characetrs then FilterExpression is not getting formed and the grid filetring is not working.


    Thanks,
    Sanjeev

    Reply

  • Tsvetoslav Tsvetoslav admin's avatar

    Posted on Apr 29, 2010 (permalink)

    Hello Sanjeev,

    The reason for the observed behavior is due to RadGrid's escaping the sepcial characters for security reasons. Here is the grid's property responsible for that:

    public static string[] IllegalStrings
    {
        get
        {
            if (_illegalStrings == null)
            {
                _illegalStrings = new string[] { " LIKE ", " AND ", " OR ", "\"", ">", "<", "<>", " NULL ", " IS " }; 
            }
            return _illegalStrings;
        }
        set
        {
            _illegalStrings = value;
        }
    }

    Hence, if you need some of those chars not to be escaped just change the illegal strings array as follows:

    protected void Page_Load(object sender, EventArgs e)
    {
        GridFilterFunction.IllegalStrings = new string[]{ " LIKE ", " AND ", " OR ", " NULL ", " IS " };
    }

    Hope this information helps.

    Regards,
    Tsvetoslav
    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.

    Reply

  • Posted on May 4, 2010 (permalink)

    Hi Tsvetoslav,
                          Thanks for the reply, it's worked for all special characters except %, [, ], and * can you provide some more details on that.

    Thanks
    Sanjeev

    Reply

  • Tsvetoslav Tsvetoslav admin's avatar

    Posted on May 10, 2010 (permalink)

    Hello Sanjeev,

    Just set EnableLinqExpressions=true for the grid and those characters will be taken into account as part of the filter value.

    Best wishes,
    Tsvetoslav
    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.

    Reply

  • Engin avatar

    Posted on Oct 27, 2011 (permalink)

    If you set the EnableLinqExpressions to true , then the single quote is not working . The sample grid application on the Telerik site (http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx) is also setting this attribute to false so it works with the apostrophe.

    In my application, I set it to false and redefine the escape characters as you suggested, and now both the ' and " characters are working on my filter; However, not those special characters. I don't understand why we cannot filter by all these characters and switching the EnableLinqExpressions attribute also switches between the ability to filter by these characters. Isn't there any other way?

    Reply

  • Tsvetoslav Tsvetoslav admin's avatar

    Posted on Oct 28, 2011 (permalink)

    Hi Engin,

    The single quote does work on my side. Could you upgrade to the latest version of the controls and test it? If the problem persists, do give more details on how to reproduce it.

    Best wishes,
    Tsvetoslav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Grid > Grid MasterTableView FilterExpression is blank on Special Chars like (%,[,],",<,>,,...) is passed from google like filtering
Related resources for "Grid MasterTableView FilterExpression is blank on Special Chars like (%,[,],",<,>,,...) is passed from google like filtering"

ASP.NET Grid Features  |  Documentation  |  Demos  |  Step-by-step Tutorial  ]