DataTables logo DataTables

via Ad Packs
Jeditable with Server Side processing
  • nunong21nunong21
    Posts: 2
    Hum... i'm not able to save the data, I can do it without server side processing, but now I need the server side..

    Anyone can help me? :s

     
    <table id="example" class="table responsive-table" ellpadding="0" cellspacing="0" border="0">
                    <thead>
                        <tr>
                            <th scope="col">Dominio</th>
                            <th scope="col">Email</th>
                            <th scope="col">Email 2</th>
                            <th scope="col">Nome</th>
                            <th scope="col">Empresa</th>
                            <th scope="col">Contacto</th>
                            <th scope="col">Estado</th>
    	           </tr>
                    </thead>
                    
                    <tbody>
                            
                    </tbody>
                </table>  
    

    this is my table 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( 'SaveToFile.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"
            } );
        }
    });
    } );
    
    this is the function that calls Datatables

    And the server side is the original one, only needed to edit the $aColumns, and the basic stuff...

    Any1 can help me? :s I can double click, edit, but I needed to know how I manage to save them if I don't have an ID on the <td>

    Thanks for the help, and sorry if anything on this post is wrong ..
This discussion has been closed.
← All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support

Get useful and friendly help straight from the source.