Fires when data is changed. In addition to the standard change event, the HierarchicalDataSource includes additional data when the event has been triggered from a child DataSource.

Event Data


If the event was triggered by a child datasource, this field holds a reference to the parent node.


var datasource = new{
  data: [
    { id: 1, text: "foo", items: [
      { id: 2, text: "bar" }
    ] }
  change: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */

// logs `undefined`, because the change event is not triggered by a node;

// logs `{ id: 1, text: "foo" }`, because the event is triggered by the root item
In this article