change
Fired when the value of the widget is changed by the user.
The event handler function context (available through the keyword this
) will be set to the widget instance.
Important: The event is not fired when the value of the widget is changed from code.
Event Data
e.sender kendo.ui.TextBox
The widget instance which fired the event.
Example - subscribe to the "change" event during initialization
<input id="textbox" />
<script>
$("#textbox").kendoTextBox({
change: function(e) {
var value = this.value();
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(value);
// Use the value of the widget
}
});
</script>
Example - subscribe to the "change" event after initialization
<input id="textbox" />
<script>
function textbox_change(e) {
var value = this.value();
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(value);
// Use the value of the widget
};
$("#textbox").kendoTextBox();
var textbox = $("#textbox").data("kendoTextBox");
textbox.bind("change", textbox_change);
</script>
The change event fires only once the value of widget is changed and the widget itself is blurred out. You can add a custom events/methods by extending the existing functionality of the TextBox. How to add a keyup
event to the TextBox is demonstrated in this article.