According to the documentation at http://docs.kendoui.com/api/framework/datasource, there is an errors field you can specify in the schema of a datasource, and, if the field is present in the response, the error handler will be called. This does not work. In the below example, i have a books.xml document as follows:
<books>
<error>something</error>
<book>
<title>booktitle</title>
</book>
<books>
And the code that uses it is below. It shows the book in the grid, but i also expect to get an alert. no alert happens, so something must be broken with this?
$(document).ready(function() {
$("#grid").kendoGrid({
dataSource: new kendo.data.DataSource({
error: function(e) {
alert(1);
},
transport: {
read: "books.xml"
},
schema: {
type: "xml",
errors: "/books/error",
data: "/books/book",
model: {
fields: {
title: "title/text()"
}
}
}
})
});
});
<books>
<error>something</error>
<book>
<title>booktitle</title>
</book>
<books>
And the code that uses it is below. It shows the book in the grid, but i also expect to get an alert. no alert happens, so something must be broken with this?
$(document).ready(function() {
$("#grid").kendoGrid({
dataSource: new kendo.data.DataSource({
error: function(e) {
alert(1);
},
transport: {
read: "books.xml"
},
schema: {
type: "xml",
errors: "/books/error",
data: "/books/book",
model: {
fields: {
title: "title/text()"
}
}
}
})
});
});