This is a migrated thread and some comments may be shown as answers.

Kendo DataSource Error in different Browser

0 Answers 60 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Engifaar
Top achievements
Rank 1
Engifaar asked on 04 Jul 2012, 12:37 PM
$(document).ready(function () {
    $("#grid").kendoGrid({
        dataSource: reportDS,
        columns: [
                    { field: "ProductID", title: "Product ID", width: "25%" },
                    { field: "ProductName", title: "Product Name", width: "25%" }
                 ]
    }); 
});
var urls = "http://....../GetData";
var reportDS = new kendo.data.DataSource({
transport: {
        read: {
            url: urls,
            dataType: "jsonp",
        }
    },
    schema: {
        type: "json",
        data: function (data) { return eval(data.Result); }
    },
    requestStart: function (e) {
        alert("Requested Started");
    },
    change: function (e) {
        alert("Change");
    },
    error: function (xhr, textStatus) {
        alert("Error : " + xhr.xhr.status);
    },
    /*error: function (e) {
    var xhr = e.xhr;
    var statusCode = e.status;
    var errorThrown = e.errorThrown;
    document.getElementById("Error").innerHTML = xhr + statusCode + errorThrown;
    },*/
});




Hello,
I am trying to trace server error like
400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
405 Method Not Allowed
and want to display custom message for user.  
Above code work fine when my service is running whereas when i stop my service and restart my kendo application. I get error Error : 200 as alert in internet Explore 8 and no message/alert box  in Google Chrome and FireFox..
Please help me out to clear my mistake...

Thanks and regard,
Deepak

No answers yet. Maybe you can help?

Tags
Data Source
Asked by
Engifaar
Top achievements
Rank 1
Share this question
or