$(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
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
$("#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 |
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