I have the following function as part of my datatables implementation. It works well to create a total on the bottom of the table for column 7.
"drawCallback": function () {
var api = this.api();
var column = api.column(7);
$(column.footer()).html(
"Total: " + api.column(7, { page: 'current' }).data().sum()
);
My client wants to format the number with a comma thousand separator. On the fields directly I use the built in function.
render: $.fn.dataTable.render.number(',', '.', 2, '')
How do you apply similar to the HTML builder for the footer total.