Datatable / Keytable / Jeditable : edit on double click

Datatable / Keytable / Jeditable : edit on double click

YopYop Posts: 2Questions: 0Answers: 0
edited October 2012 in KeyTable
Hi,

KeyTable with jeditable is just working great and it is useful to have cell selection on click. I would like to have cell edition on double click but I can't find a way to handle this. Do you have any idea / suggestion / example ? Perhaps by overloading keytable click event ?

Thanks

Replies

  • YopYop Posts: 2Questions: 0Answers: 0
    edited October 2012
    It is always when you ask that you find the solution

    I added a handler on dblclick event which simulate the key press :
    [code]$('.editable').dblclick(function() {
    e = jQuery.Event("keypress");
    e.which = 13;
    e.keyCode = 13;
    $(this).trigger(e);
    });
    [/code]

    I thought it would create problem with KeyTable click event but in fact the click event is also triggered which allow to have the cell selected before editing.

    If you have any cleaner idea, I would be curious to this it.
This discussion has been closed.