Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81690

Is it possible to add new values to tablefooter using fnAddData()

$
0
0
I m using the following code to populate a dataTable from JSON data source.Here to refresh the table after each call I m using fnAddData() and appending the new JSON data , while doing so the table footer is not getting refreshed.. Is it possible to refresh the table footer after appending new data ?
$.ajax({  
type : "POST",
url : url,
data:MODEL,
success : function(data)
{        
if (typeof ddTable == 'undefined')
{            
ddTable=$('#ex_table').dataTable({
"aaData" : data.response,
"aoColumns" : [
{ "sTitle": "Col1", "bSortable": true},
{ "sTitle": "Col2", "bSortable": true },
{ "sTitle": "Col3", "bSortable": true },
{ "sTitle": "Col4", "bSortable": true},
{ "sTitle": "Col5", "bSortable": true },
{ "sTitle": "Col6","bSortable": true }],
"bFilter" : false,
"bLengthChange" : false,
"bPaginate" : true,
"bInfo" : true,
"iDisplayLength" : 5,
 "fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay )
{
/*displaying footer */
}
});
}
else
{
ddTable.fnClearTable( 0 );
ddTable.fnAddData(data.response);
}
}
});

Viewing all articles
Browse latest Browse all 81690

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>