After ajax call filter and sort is working but data is not updating.

After ajax call filter and sort is working but data is not updating.

rameshktsrameshkts Posts: 1Questions: 0Answers: 0

Hello,

I am using datatable in my application.I am facing an issue like after ajax call filter and sort is working but data is not updating.
I will get every 15s once via ajax call. The dynamic data not updating into datatable.

init:

table = $('#table1').DataTable({

                     "autoWidth": false,
                    "bFilter": true,
                    "bInfo": true,
                    "bSort": true,
                    "aaSorting": [[3, 'asc']],
                    "bPaginate": false,
                    "bDestroy": true,
                    "sScrollY": 500px,
                    "sScrollXInner": false,
                    "bLengthChange": true,
                    "iDisplayLength": -1,


                });

                $('#myInputTextField').keyup(function() {

                     table.search($(this).val()).draw();
                });

I am building the data in java script append into data table <tbody>
Ajax:

if(table != undefined){
table.search($('#myInputTextField').val()).draw();
}

Please give me solution for this.

This discussion has been closed.