Kendo MVVM and binding or extending custom events

前端 未结 2 1003
时光说笑
时光说笑 2020-12-17 02:22

I have a ComboBox in my page and I want to bind keypress event to my Kendo ComboBox when the cliend writes down any letter.

As I understand kendo doesn\'t have any k

2条回答
  •  隐瞒了意图╮
    2020-12-17 02:50

    You can capture the keydown event of all ComboBox controls using the following code:

    kendo.ui.ComboBox.fn._keydown = function(e) {
        if (e.which == 13) {
            alert("key pressed!");
        }
    };
    

    This also works with the DropDownList widget that generally doesn't support the keypress events.

提交回复
热议问题