Sum over rendered data
Sum over rendered data
ranga
Posts: 31Questions: 12Answers: 2
Hello
Can somebody help me with How to add columns().render() option to below code to get the sum of a rendered column with sum plugin ?
{data: null,
"render": function (data, type, row)
{ return (data["a1"] * data["b1"]) }},
"footerCallback": function () {
var api = this.api(),
columns = [4, 5]; // Add columns here
for (var i = 0; i < columns.length; i++) {
$('tfoot th').eq(columns[i]).html(+api.column(columns[i], { filter: 'applied' }).data().sum() + '<br>');
}
I saw that as a recommended method by Allen but now cannot find it and no idea how to use it here.
Thank You for the Help
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @ranga ,
This thread will sort you out,
Cheers,
Colin
@Colin Thanks A LOT Mate . Works Great !