kendoKeydown
Triggered when the user presses a keyboard key while the DropDownTree is focused.
The event handler function context (available via the this keyword) will be set to the widget instance.
Event Data
e.sender kendo.ui.DropDownTree
The widget instance which fired the event.
e.preventKendoKeydown Boolean
If set to true prevents the default DropDownTree keydown logic.
e.preventDefault Function
If invoked cancels the default action that belongs to the keydown event.
Example - subscribe to the "kendoKeydown" event during initialization
<input id="dropdowntree" />
<script>
$("#dropdowntree").kendoDropDownTree({
dataSource: [
{ text: "Item 1", items: [{ text: "Sub Item 1" }] },
{ text: "Item 2" }
],
kendoKeydown: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(e.keyCode);
}
});
</script>
Example - subscribe to the "kendoKeydown" event after initialization
<input id="dropdowntree" />
<script>
$("#dropdowntree").kendoDropDownTree({
dataSource: [
{ text: "Item 1", items: [{ text: "Sub Item 1" }] },
{ text: "Item 2" }
],
});
var widget = $("#dropdowntree").data("kendoDropDownTree");
widget.bind("kendoKeydown", function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log(e.keyCode);
});
</script>