可编辑+数据表+服务器端处理

时间:2012-08-01 16:53:55

标签: datatables jeditable

我有这段代码......

    $(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"
        } );
    }
});
} );

它的作用是Datatables的服务器端搜索......

我的问题是,我不知道该怎么做,以便通过服务器端处理获得Jeditable功能...

有人可以帮忙吗? :■

1 个答案:

答案 0 :(得分:0)

值将位于update.php中的HTTP Request对象中。根据上面的代码,您的更新值为“value”,row_id为“row_id”。