change

Fires when a field value is updated through the set method. Inherited from kendo.data.ObservableObject. For more information and examples, refer to the change API reference.

Example

<script>
var Product = kendo.data.Model.define({
    fields: {
        name: { type: "string" },
        price: { type: "number" },
        inStock: { type: "boolean" }
    }
});

var product = new Product({ name: "Monitor", price: 299, inStock: true });

// Bind to the change event
product.bind("change", function(e) {
    /* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("Change event fired!");
    /* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("Field: " + e.field);
    /* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("New value: " + e.value);
    /* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("Old value: " + e.previousValue);
});

product.set("name", "Gaming Monitor"); // triggers change event
product.set("price", 399); // triggers change event
product.set("inStock", false); // triggers change event
</script>
In this article
change
Not finding the help you need?
Contact Support