Footer with Javascript Array as source of data
Footer with Javascript Array as source of data
FloppyKing
Posts: 5Questions: 0Answers: 0
Probably seems like a stupid question, but how can you get your DataTable to show a footer row if you use a javascript array as your data source?
This discussion has been closed.
Replies
Allan
Step 1:-
Create the HTML string for table as well as for footer.
htmlstr='MonthQuarterWeekQuantityGrand Total88,714';
Step 2:-
Draw the table only with footer.
$('#'+divId).html(htmlstr);
Step 3:-
Use the actual configurations.
$('#'+TableId).dataTable({
"aaData":ReportData, // ReportData is javascript array contains only the report body part
"aoColumns":columnTitles, //columnTitles contains the heading informations
"bJQueryUI": true,
"sPaginationType": "full_numbers"
});