Kendo 网格未检测到按键按下或按键事件

Kendo grid not detecting keydown or keypress event

我有这样的东西

HTML:

<div class="outer"> 
   <div class="myKendoGrid"> </div>
</div> 

JS:

$(function () {
     var grid = $(".myKendoGrid").data("kendoGrid");
     grid.table.on("keypress", function (e) {
          console.log('pressed');
     });
 });

问题:无法检测到网格中的按键或按键按下。

引用自: http://www.telerik.com/forums/grid-row-delete-by-using-keyboard-delete-key

在启动点击事件之前,您无法注册按键或按键事件。请尝试以下操作。

$(".myKendoGrid").on("click", "table", function (e) {
        window.onkeydown = function (event) {
                alert("key pressed");
            }
});

尝试使用 DIV 的 ID:

               $("#KGrid").on("click", ".myKendoGrid", function () {
...

}
<div id="KGrid" class="myKendoGrid"> </div>