bind

Attaches an event handler for the specified event.

Example - subscribe to an event

<script>
var array = new kendo.data.ObservableArray([1, 2]);
array.bind("change", function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log("changed");
});
array.push(3); // triggers the "change" event and the handler outputs "changed"
</script>

Parameters

eventName String

The name of the event.

handler Function

The function which will be invoked when the event is fired.

In this article