Edit this page

push

Fired when the data source receives a push notification or the pushCreate, pushUpdate, or pushDestroy methods are called.

Event Data

e.items Array

The array of data items that were affected by the push notification.

e.type String

The type of the push notification.

One of the following values:

  • "create"
  • "update"
  • "destroy"
e.sender kendo.data.DataSource

The data source instance which fired the event.

Example - subscribe to the push event during initialization

<script>
function dataSource_push(e) {
  console.log(e.type); // displays "update"
  console.log(e.items[0].name); // displays "Jane Doe"
}
var dataSource = new kendo.data.DataSource({
  push: dataSource_push,
  schema: {
    model: {
      id: "id"
    }
  },
  data: [
    { id: 1, name: "John Doe" }
  ]
});
dataSource.fetch();
dataSource.pushUpdate({ id: 1, name: "Jane Doe" });
</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