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?
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
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:
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!