Wire Popup to doubleclick row event

5 posts, 0 answers
  1. Marc
    Marc avatar
    66 posts
    Member since:
    Jul 2010

    Posted 08 Oct 2012 Link to this post

    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?
  2. OnaBai
    OnaBai avatar
    55 posts
    Member since:
    Aug 2012

    Posted 08 Oct 2012 Link to this post

    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));
    });
  3. Kendo UI is VS 2017 Ready
  4. Marc
    Marc avatar
    66 posts
    Member since:
    Jul 2010

    Posted 08 Oct 2012 Link to this post

    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)); }
    });

  5. OnaBai
    OnaBai avatar
    55 posts
    Member since:
    Aug 2012

    Posted 08 Oct 2012 Link to this post

    Just for curiosity: what did not work? Did not open the popup?
  6. Anthony
    Anthony avatar
    7 posts
    Member since:
    Oct 2013

    Posted 01 Mar in reply to Marc Link to this post

    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!

Back to Top
Kendo UI is VS 2017 Ready