hasChanges Boolean

Checks if the data items have changed.

Requires an [ID field] to be configured in schema.model.id. Otherwise, will always return true.


Boolean—Returns true if the data items have changed. Otherwise, returns false.

Example - check if the data source is changed

var dataSource = new kendo.data.DataSource({
  data: [
    { id: 1, name: "Jane Doe" }
  schema: {
    model: { id: "id" }
dataSource.fetch(function() {
  console.log(dataSource.hasChanges()); // displays "false"
  dataSource.add({ name: "John Doe" });
  console.log(dataSource.hasChanges()); // displays "true"
In this article
Not finding the help you need? Improve this article