[SOLVED] How to disable table refresh after cell edit, with editable?

[SOLVED] How to disable table refresh after cell edit, with editable?

fbasfbas Posts: 1,094Questions: 4Answers: 0
edited July 2011 in Plug-ins
After editing a cell, I don't want the table to refresh/redraw. The refresh/redraw brings the user back to page 1 of data, losing their place. How can I disable the refresh/redraw after edit using the editable plugin?

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    edited July 2011
    solution is to either override "callback" in each editable aoColumns definition
    [code]
    $('#yourtableid').dataTable().makeEditable({
    aoColumns: {
    placeholder : ' ',
    indicator: 'Saving...',
    tooltip: 'Dbl Click to edit',
    callback: function () { $(".dataTables_processing").css('visibility', 'hidden'); } // or some other function
    }

    });
    [/code]

    or edit line 152 of jquery.dataTables.editable.js to remove or comment out fnUpdate call
    [code]
    //oTable.fnUpdate(sNewCellDisplayValue, aPos[0], aPos[2]);
    [/code]
This discussion has been closed.