Pagination is not working for next page

时间:2018-07-25 05:03:10

标签: jquery datatables

Default data is coming in datatable. When i press on next page button so processing bar is showing but data is not pushing in datatble and data is coming in response object.

function call_datatable(data){
 var dataTable = $('#anomaly-table-data').DataTable(

            {
                "processing": true,
                "serverSide": true,
                "paging": true,
                 "bInfo": true,
                "ajax": {
                    "url": "/anomaly_table/",
                    data: data,
                    method:'POST'
                },
                "columns": [
                    {"data": "count"},
                    {"data": "timestamp"},
                    {"data": "description"},
                    {"data": "aggregate_interval"},
                    {"data": "acked"},
                    {"data": "action"},
                ],


                "bLengthChange": false,
                "bFilter": true,
                //    "bInfo": false,
                "bAutoWidth": false,
                columnDefs: [
                    {width: '25px', targets: 0}, //step 2, column 1 out of 6
                    {width: '100px', targets: 1}, //step 2, column 2 out of 6
                    {width: '1000px', targets: 2},  //step 2, column 3 out of 6
                    {width: '80px', targets: 3},  //step 2, column 4 out of 6
                    {width: '5px', targets: 4},  //step 2, column 5 out of 6
                    {width: '50', targets: 5},  //step 2, column 6 out of 6

                ],
                'createdRow': function (row, data, dataIndex) {
                    $(row).attr('id', data['id']);
                },
                  "error": function (xhr, error, thrown) {
            alert(thrown.message)
        }
            }
}

0 个答案:

没有答案