2
votes

I have a Kendo UI Grid on a page and I'd like to allow the user to double-click a row to start editing it. I have the following JS code to detect a double-click, but I don't know what to include in the function to enter edit mode for the row clicked.

$(document).ready(function () {
    $("#grid").delegate("tbody>tr", "dblclick", function () { alert("Double Click"); });
});
1

1 Answers

2
votes

If you have enabled inline or popup edition in your grid this code should work:

$(document).ready(function () {
    $("#grid").on("dblclick", "tbody>tr", function (e) {
      $("#grid").data('kendoGrid').editRow(this); });
});

PS. jQuery delegate() is deprecated. You should use on() instead.