Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
620
requestError event not firing
posted

Hi,

I am currently using the Infragistics JQuery Grid with server side paging. If the server throws an error when it is trying to get the appropriate page of data, then I would like to get this error message in JavaScript and do some additional processing.

In the API documentation at the link below, it says there is a "requestError" event which looks like it would be suitable for what I am trying to achieve. However, this event does not seem to fire when an error occurs.

http://help.infragistics.com/jQuery/2011.2/ui.iggrid

My code looks like this:

         $('#' + gridid).igGrid({ requestError: function(evt, ui) { 
            alert("Hello");
        } }); 

The selector is definitely correct as I have successfully had other events grid events firing with this selector. I can also confirm that the ajax request the Grid is making to get the appropriate page, is responding with a HTTP Status code "500" for Internal Server Error.

Is there any additional steps I need to perform to achieve what I am looking for?

 

 

Parents
  • 24671
    posted

    hi,

    internally the grid uses jQuery's ajax API in order to invoke remote requests for data:

    http://api.jquery.com/jQuery.ajax/

    It handles the error callback, and if it is invoked, it sets the argument to false.

    i suggest handling the error callback manually by calling $.ajax on the respective URL and check if it gets called. if it doesn't , it's probably not related to the grid or the data source, but more to jQuery - there could be differences or issues depending on the jquery version- , or to the server-side logic.

    Thanks,

    Angel

Reply Children