Edit this page

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 has changes

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"
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article