Hi, I created a datasource like follow:
dataSource: new $.ig.JSONPDataSource({ dataSource: $widget.options.dataSource.remoteUrl, type: "remoteUrl", responseDataKey: "Results", callback: function (success, error) { if (!success) { alert(error); } }, urlParamsEncoded: function (owner, params) { $.fc.igHelper.igSetOdataDateFilter(owner, params); } })
but the callback method does not get fired if an error occurs.
Hello Christoff,
After further research it appears that this behavior is expected, because JSONP has limitation about error callback.Here it a helpful thread describing a work around. It could be achieved using hacks like timeout.http://forum.jquery.com/topic/jquery-ajax-with-datatype-jsonp-will-not-use-error-callback-if-request-fails#14737000000442131
Thank you for posting in our forum.
Hello Christoff, I have created case number CAS-124796-P5N5M0 - to assist you further with your inquiry. I will use this case to provide you with updates for Development ID 154308, which has already been created for this forum post.
In JSONPDataSource we don't handle the error callback from the $.ajax API.
I've logged a bug in our internal bug tracking system with an id 154308. We will create a case for you and link it to the bug, so that you can track its progress in your account in the 'Support Activity' page. You'll be notified by e-mail when the bug is fixed and available for download.
Best regards, Martin Pavlov Infragistics, Inc.