Need help using fnAddData for appending rows in the grid . Rows are not being displayed.

Need help using fnAddData for appending rows in the grid . Rows are not being displayed.

AshishGAshishG Posts: 5Questions: 1Answers: 0

Hello Allan,

I am new to Datatables and still learning it. I am stuck at one place. I am using Datatable version 1.9 (So rows.add() cannot be used, i guess).

.success(function(data){ 
        var rows = data.data; 
        for(var i =0; i<rows.length;i++){ 
                   var tempArray = []; 
                   $.each(rows[i], function(k,v){ 
                              tempArray.push(v); 
                   }); 
                   $('.grid').dataTable().fnAddData(tempArray,false); 
        } 
console.log("success"); 
});

Replies

This discussion has been closed.