Filter does not work when Coulmn name contain special characters like $,&,">

2 posts, 0 answers
  1. subrat
    subrat avatar
    4 posts
    Member since:
    Dec 2010

    Posted 01 Jul 2015 Link to this post

    I am using custom filter in my radgrid. I am creating the filter column like this:

    FilterColumn : GridBoundColumn



    _filterCombo = new RadComboBox()
                                      ID = "filterCombobox" + this.UniqueName,

                                      OnClientItemsRequested = "OnClientItemsRequestedHandler",
                                      OnClientDropDownOpening = "OnClientItemsRequestedHandler",

                                      //other code


     _filterCombo.SelectedIndexChanged += filterCombo_SelectedIndexChanged;
     _filterCombo.ItemsRequested += filterCombo_ItemsRequested;



    When the column name contain special characters like $,& ] etc the filter does not work.

    I have noticed that in this case neither OnClientDropDownOpening nor ItemsRequested event fires.

     I have tried the solution in the thread but this is not working.

    I am still not able to filter even after making the changes mentioned in the above thread.

     Also when my column name contains "> (e.g te">stcolumn ), than the grid fails to show the combobox. Instead it shows html and textboxes.

    It correctly shows the combobox if I htmlencode the above column name but filtering still does not work even after setting IllegalStrings and EnableLinqExpressions in page_load event.

    GridFilterFunction.IllegalStrings = new string[] { " LIKE ", " AND ", " OR ", " NULL ", " IS " };
                rg_Report.EnableLinqExpressions = true;

     My telerik.UI version is 2014.

  2. Eyup
    Eyup avatar
    3956 posts

    Posted 06 Jul 2015 Link to this post

    Hello Subrat,

    Try to disable the EnableLinqExpressions property, but please keep in mind that changing the illegal strings can be risky:

    Hope this helps.

    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