mixing editable with row selection

mixing editable with row selection

barrykeepencebarrykeepence Posts: 22Questions: 0Answers: 0
edited November 2012 in General
I am trying to use double click to edit cells and single click to select them.

All is working fine except that when I use the select option for editable the row gets selected (I suppose because the click to select the option is taken by the highlight handler as well).

How can I get the select click to not select the row?

here is the code:

[code]
$("#example tr td:nth-child(2)").editable (function(value, settings) {

// my func
}, {
data : " {'data 1 1':'data 1','data 2':'data 2','data 3':'data 3'}",
type : 'select',
submit : 'ok',
event : 'dblclick',
});
[/code]

Replies

  • barrykeepencebarrykeepence Posts: 22Questions: 0Answers: 0
    It's me again.

    I worked out how to detect the form in the dom:
    [code]
    var inputs = $(this).find('form').length;
    [/code]
    I put this in the click handler and if I detect a form in the tree i just return and do nothing.

    I hope this is useful to someone trying to solve the same problem.
This discussion has been closed.