dataTables + jeditable (value not sticking)

dataTables + jeditable (value not sticking)

willtxwilltx Posts: 5Questions: 0Answers: 0
edited February 2013 in DataTables 1.9
I think this is probably more a jeditable issue but I'm hoping someone has come across this already. On the blur event the value is passed to a function versus a server call but the changed value isn't sticking.

sample: http://jsfiddle.net/willtx/FTgs9/4/
jeditable doc: http://www.appelsiini.net/projects/jeditable

[code]$('.editable').editable(function(value, settings) {
console.log(this);
console.log(value);
console.log(settings);
return(value);
}, {
type : 'textarea',
submit : 'OK',
});[/code]

Replies

  • willtxwilltx Posts: 5Questions: 0Answers: 0
    Aha. It was simple. What was different than what was specified in the doco was the assumption a buttton was going to be used to submit a change. I didn't want to use a button. I was missing the onblur option. Once that was declared, the new value is now being "saved".

    [code]
    function MakeEditable() {
    $("#STRTable").dataTable().$('td:eq(2)').editable(function(value, settings) {
    //do nothing, no serverside call
    return value;
    },
    {
    type: 'text',
    submit: '',
    cancel: '',
    tooltip: 'Click to Edit',
    onblur: "submit"
    });
    };
    [/code]
This discussion has been closed.