Adding the data in datatable and refresh ?

Adding the data in datatable and refresh ?

motguptamotgupta Posts: 19Questions: 5Answers: 0

I have data loaded in datatable. I want to add more data in table on click of link instead of redarwaing complete table

Here is mine data table code(I have added only relevant code here)

 function(){
       oTable=      $('#customerTable').dataTable({
                    "bJQueryUI": true,
                    "iDisplayStart":0,
                    "iDisplayLength": 10,
                    "bRetrieve": true,
                    "bServerSide": true,
                    "bFilter": false,
                    "bInfo": false,
                    "bAutoWidth": false,
                    "aaSorting": [[1,'desc']],
                    "aoColumns": [
                    {"aTargets": [0],"sName":"customer.fullName", "mData": function(response){
                        return response.customer.fullName;
                    }, "bSortable": false},
                    {"aTargets": [1],"sName":"updatedDate", "mData": function(response){
                        var updateDate = response.updatedDt;
                        return updateDate;
                    }, "bSortable": true},

                    ]

                    "fnDrawCallback": function(oSettings) {


                            }
                        });
            }

When I do oTable.fnGetData(); // It displays rows

Here is mine add data code in data table

 for(i=0; i<jsonData.length;i++) {// i have debugged data is in right json format in js
            oTable.fnAddData(data[i]);
            oTable.fnDraw();

    }

When I do oTable.fnGetData() It displays rows 15 rows but still data is not displayed in my table . Also there is no error on browser console. Am i missing anything ?
Why data is not getting refreshed on table ?

Update :- Using datatable version 1.9.1

Replies

This discussion has been closed.