Completed
Last Updated: 09 May 2022 12:31 by ADMIN
ADMIN
Pavlina
Created on: 02 Feb 2016 07:01
Category: UI for ASP.NET AJAX
Type: Bug Report
3
Filtering grid item with single quote causes Javascript error

		
4 comments
ADMIN
Attila Antal
Posted on: 09 May 2022 12:31

Hi Tom,

Regarding the Illegal Strings, you can refer to Eyup's answer sent on 28th June 2019.

If you're still experiencing difficulties, please submit a Formal Support Ticket and share the details that will help us replicate the scenario.

Our Technical Team will help you investigate the problem.

Regards,
Attila Antal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tom
Posted on: 02 May 2022 14:48

As mentioned in the forum thread https://www.telerik.com/forums/apostrophe-in-radgrid-filtering-causing-javascript-error, a single quote in a value that is part of a DetailKeyField / MasterKeyField relationship also triggers a JavaScript error.

In my scenario, I am monitoring a log of code exceptions thrown by our interface. The c# exception message is one of the key fields linking the master and detail tables. When the value includes a single quote, the relationship fails.  (See attached image.)

A fix to this error would be terrific.

Remainder is example JavaScript error message:

Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a9ddf364d-d65d-4f01-a69e-8b015049e026%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2022.1.302.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a519a718b-c62d-4bf2-9a78-90a0aad13e14%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3af46195d3%3a874f8ea2%3ab2e06756%3a92fe8ea0%3afa31b949%3a33715776%3a4877f69a%3ac128760b%3a19620875%3a490a9d4e%3abd8f85e4%3a88144a7a%3a1e771326%3a4cacbc31%3adc752f02%3a6d43f6d9:6 
        

       Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Syntax error: Missing operand after 'seq' operator.
    at Function.Error.create (http://localhost:51093/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a9ddf364d-d65d-4f01-a69e-8b015049e026%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2022.1.302.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a519a718b-c62d-4bf2-9a78-90a0aad13e14%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3af46195d3%3a874f8ea2%3ab2e06756%3a92fe8ea0%3afa31b949%3a33715776%3a4877f69a%3ac128760b%3a19620875%3a490a9d4e%3abd8f85e4%3a88144a7a%3a1e771326%3a4cacbc31%3adc752f02%3a6d43f6d9:6:2736)
    at Sys.WebForms.PageRequestManager._createPageRequestManagerServerError (http://localhost:51093/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a9ddf364d-d65d-4f01-a69e-8b015049e026%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2022.1.302.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a519a718b-c62d-4bf2-9a78-90a0aad13e14%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3af46195d3%3a874f8ea2%3ab2e06756%3a92fe8ea0%3afa31b949%3a33715776%3a4877f69a%3ac128760b%3a19620875%3a490a9d4e%3abd8f85e4%3a88144a7a%3a1e771326%3a4cacbc31%3adc752f02%3a6d43f6d9:15:11490)
    at Sys.WebForms.PageRequestManager._parseDelta (http://localhost:51093/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a9ddf364d-d65d-4f01-a69e-8b015049e026%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2022.1.302.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a519a718b-c62d-4bf2-9a78-90a0aad13e14%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3af46195d3%3a874f8ea2%3ab2e06756%3a92fe8ea0%3afa31b949%3a33715776%3a4877f69a%3ac128760b%3a19620875%3a490a9d4e%3abd8f85e4%3a88144a7a%3a1e771326%3a4cacbc31%3adc752f02%3a6d43f6d9:15:29608)
    at Sys.WebForms.PageRequestManager._onFormSubmitCompleted (http://localhost:51093/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a9ddf364d-d65d-4f01-a69e-8b015049e026%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2022.1.302.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a519a718b-c62d-4bf2-9a78-90a0aad13e14%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3af46195d3%3a874f8ea2%3ab2e06756%3a92fe8ea0%3afa31b949%3a33715776%3a4877f69a%3ac128760b%3a19620875%3a490a9d4e%3abd8f85e4%3a88144a7a%3a1e771326%3a4cacbc31%3adc752f02%3a6d43f6d9:15:25637)
    at Array.<anonymous> (http://localhost:51093/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a9ddf364d-d65d-4f01-a69e-8b015049e026%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2022.1.302.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a519a718b-c62d-4bf2-9a78-90a0aad13e14%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3af46195d3%3a874f8ea2%3ab2e06756%3a92fe8ea0%3afa31b949%3a33715776%3a4877f69a%3ac128760b%3a19620875%3a490a9d4e%3abd8f85e4%3a88144a7a%3a1e771326%3a4cacbc31%3adc752f02%3a6d43f6d9:6:307)
    at http://localhost:51093/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a9ddf364d-d65d-4f01-a69e-8b015049e026%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2022.1.302.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a519a718b-c62d-4bf2-9a78-90a0aad13e14%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3af46195d3%3a874f8ea2%3ab2e06756%3a92fe8ea0%3afa31b949%3a33715776%3a4877f69a%3ac128760b%3a19620875%3a490a9d4e%3abd8f85e4%3a88144a7a%3a1e771326%3a4cacbc31%3adc752f02%3a6d43f6d9:6:51370
    at Sys.Net.WebRequest.completed (http://localhost:51093/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a9ddf364d-d65d-4f01-a69e-8b015049e026%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2022.1.302.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a519a718b-c62d-4bf2-9a78-90a0aad13e14%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3af46195d3%3a874f8ea2%3ab2e06756%3a92fe8ea0%3afa31b949%3a33715776%3a4877f69a%3ac128760b%3a19620875%3a490a9d4e%3abd8f85e4%3a88144a7a%3a1e771326%3a4cacbc31%3adc752f02%3a6d43f6d9:6:89758)
    at XMLHttpRequest._onReadyStateChange (http://localhost:51093/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a9ddf364d-d65d-4f01-a69e-8b015049e026%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2022.1.302.45%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a519a718b-c62d-4bf2-9a78-90a0aad13e14%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3af46195d3%3a874f8ea2%3ab2e06756%3a92fe8ea0%3afa31b949%3a33715776%3a4877f69a%3ac128760b%3a19620875%3a490a9d4e%3abd8f85e4%3a88144a7a%3a1e771326%3a4cacbc31%3adc752f02%3a6d43f6d9:6:84357)
 
Attached Files:
ADMIN
Eyup
Posted on: 28 Jun 2019 10:57
Hi,

Generally, filtering with quotes works by default. You can verify that by searching the ShipName column for app' value in the following live sample:
https://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/basic-filtering/defaultcs.aspx

However, strings like double quotes, AND/OR clauses are registered as illegal in the grid internal logic. You can remove them using the IllegalStrings collection as demonstrated here:
https://www.telerik.com/support/kb/aspnet-ajax/grid/details/filter-grid-with-quotes-and-or-or-other-special-symbols

If you continue to have a client or server-side error with filtering single quotes, you can open a formal support ticket or a forum thread for RadGrid and our Technical Support Team will handle the case accordingly.

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Murali
Posted on: 12 Dec 2018 09:49
Hello do we have any fix for this filtering issue...