user6487497
user6487497

Reputation:

fnDraw is not redraw the datatable in ajax done request

oTable = $('#SLData').DataTable({
        "lengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'All']],
        "order": [[ 0, "asc" ]], "pageLength": 10,
        'processing': true, 'serverSide': true,
        'sAjaxSource': '<?php echo base_url();?>dev.php/website/edit_categories_list',

        "columns": [null, null, null, null, null, {"orderable":false, "searchable": false}]
    });

this is server side data table and trying to redraw the table after some operation in ajax calling oTable.fnDraw(); in ajax done function but it is not redraw the datatable Thanks in advance

Upvotes: 0

Views: 666

Answers (1)

Husain Ahmed
Husain Ahmed

Reputation: 868

first destroy the datatable with object and then try to initialize the datatable in ajax done function

oTable.fnDestroy();

$('#SLData').dataTable();

Try this code, I hope this is working.

Upvotes: 1

Related Questions