This is a migrated thread and some comments may be shown as answers.

Wire Popup to doubleclick row event

4 Answers 348 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 08 Oct 2012, 03:35 PM
Is there a way to open the GridEditMode.PopUp windows when the users double clicks on a row.

I've got the doubleclick handler


double click event handler
$("#MyGrid").delegate("tbody>tr", "dblclick", function(){

//invoke the popup editor here

});

Do I need to give it an id?

4 Answers, 1 is accepted

Sort by
0
OnaBai
Top achievements
Rank 2
answered on 08 Oct 2012, 06:01 PM
You need to specify which row to edit.

Try the following:
$("#MyGrid").delegate("tbody>tr", "dblclick", function(ev, a){
    $("#MyGrid").data("kendoGrid").editRow(grid.tbody.find(ev.currentTarget));
});
0
Marc
Top achievements
Rank 1
answered on 08 Oct 2012, 06:56 PM
Thanks, but didn't work (no popup came up). This seems to work:

 

 

 

 

$("#grid").delegate("tbody>tr", "dblclick", function(){

if (!$(this).hasClass('k-grid-edit-row')) {
$("#grid").data("kendoGrid").editRow($(this)); }
});

0
OnaBai
Top achievements
Rank 2
answered on 08 Oct 2012, 08:03 PM
Just for curiosity: what did not work? Did not open the popup?
0
Anthony
Top achievements
Rank 1
answered on 01 Mar 2016, 05:08 PM

Marc, your code worked for me too:

$("#grid").delegate("tbody>tr", "dblclick", function () {
 
    if (!$(this).hasClass('k-grid-edit-row')) {
        $("#grid").data("kendoGrid").editRow($(this));
    }
 
});

Thank you!

Tags
Grid
Asked by
Marc
Top achievements
Rank 1
Answers by
OnaBai
Top achievements
Rank 2
Marc
Top achievements
Rank 1
Anthony
Top achievements
Rank 1
Share this question
or