Edit this page

error

Fired when a request to the remote service fails.

The event handler function context (available via the this keyword) will be set to the data source instance.

If the schema.errors option is set and the server response contains that field then the error event will be fired. The errors field of the event argument will contain the errors returned by the server.

Event Data

e.errorThrown Object (optional)

Optional exception.

e.sender kendo.data.DataSource

The data source instance which fired the event.

e.status String

String describing the type of the error.

e.xhr Object

The current jqXHR.

Example - subscribe to the error event after initialization

<script>
function dataSource_error(e) {
  console.log(e.status); // displays "error"
}
var dataSource = new kendo.data.DataSource({
  transport: {
    read: {
      url: "https://demos.telerik.com/kendo-ui/service/"
    }
  }
});
dataSource.bind("error", dataSource_error);
dataSource.fetch();
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy