Search code examples
datatablesjeditable

Jeditable + Datatables + Server Side Processing


I have this piece of code...

    $(document).ready(function() {
   var oTable = $('#example').dataTable( {
    "bProcessing": true,
    "bServerSide": true,
    "sAjaxSource": "../listagem/listar_manuais.php",
    "sPaginationType": "full_numbers",
    "fnDrawCallback": function () {
        $('td', this.fnGetNodes()).editable( 'update.php', {
            "callback": function( sValue, y ) {
                var aPos = oTable.fnGetPosition( this );
                oTable.fnUpdate( sValue, aPos[0], aPos[1] );
            },
            "submitdata": function ( value, settings ) {
                return { "row_id": this.parentNode.getAttribute('id') };
            },
            "height": "14px"
        } );
    }
});
} );

What it does is the server side search of Datatables...

My problem, is that i don't kno what to do from here, to get the Jeditable functional with the server side processing...

Can anyone help? :s


Solution

  • The values will be in the HTTP Request object in your update.php. Your updated value is in "value", row_id in "row_id" according to your code above.