How to handle a Kendo UI Grid row double-click event

后端 未结 4 2152
迷失自我
迷失自我 2020-12-31 10:34

I have a selectable KendoUI grid in my MVC app. I want to do something when the user double-clicks on the grid.

I don\'t see a double-click event for the grid.

4条回答
  •  迷失自我
    2020-12-31 11:14

    Here's another way to handle it:

    var grid = $('#myGrid').kendoGrid({
        columnMenu: true,
        filterable: true,
        selectable: true,
        // and many more configuration stuff...
    }).data('kendoGrid');
    
    grid.tbody.delegate('tr', 'dblclick', function() {
        var dataItem = grid.dataItem($(this));
        // do whatever you like with the row data...
    });
    

提交回复
热议问题