Apostrophe in RadGrid filtering causing JavaScript error

4 posts, 0 answers
  1. Richard
    Richard avatar
    4 posts
    Member since:
    Feb 2015

    Posted 06 Feb 2015 Link to this post

    Using 2014.3.1209.40 DLL getting JavaScript error if user tries to filter a column with a string containing an apostrophe (single quote, chr(39))

    Same behavior can be seen in Telerik's own online demo: http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx
    In Model column enter something like Joe's click the filter button, select Contains and you get:

    Line: 5022
    Error: Expected ')'

    Tried escaping the apostrophe as \' or /' or ['] - same result

    As an unrelated issue - tried entering HTML encoded string version Joe's and clicked filter/Contains - page redirected to "Oh, no!  It seems we've lost this page!"

  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 10 Feb 2015 Link to this post

    Hi Richard,

    This problem is already fixed in our Q1 2015 Beta release which is already available for download. You can test how the grid filtering is working with this version here:
    http://demos.telerik.com/aspnet-ajax-beta/grid/examples/overview/defaultcs.aspx#

    Regards,
    Pavlina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Curtis
    Curtis avatar
    23 posts
    Member since:
    Jan 2008

    Posted 31 Jan in reply to Pavlina Link to this post

    I am using the latest 2016.1.113.45 and am getting a Javascript error when filtering with an apostrophe/single quote when the grid is in RenderMode="Mobile". When the grid is in RenderMode="Auto", the filtering with an apostrophe works.

    I will report the bug as well.

    Timestamp: 1/31/2016 10:29:12 PM
    Error: SyntaxError: missing ) after argument list
    Source File: http://localhost:86/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_ctl00_rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2016.1.113.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen%3acb3d1a3e-7303-48dc-a612-61700f912203%3aed16cbdc%3a56e9f55f%3af46195d3%3a2a733ecd%3ab7778d6c%3ae085fe68%3a531d45cc%3aa00338a7%3a8bd58b44%3a2d1fc316%3a72040467
    Line: 1, Column: 143
    Source Code:
    $c1$grid$ctl00;HeaderContextMenuFilter;Name|?Contains|crowe's|?NoFilter||?')

  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 02 Feb Link to this post

    Hello Curtis, 

    Indeed the issue you are facing exists in the latest version and it is already logged in our bug tracking system. There is also a feedback item on the matter from where you can follow its progress :
    http://feedback.telerik.com/Project/108/Feedback/Details/181661-filtering-grid-item-with-single-quote-causes-javascript-error

    Regards,
    Pavlina
    Telerik
    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