Calulating totals for multiple columns through fnFooterCallback()
Calulating totals for multiple columns through fnFooterCallback()
Hello,
I will like to calculate totals for 3 of my columns and display it below respective column in footer. I see that via fnFooterCallback() there is provision to show only 1 at the moment.
There is a thread in which bjenkins has tried to do similar thing. However, I couldn't do the same in my code.
http://datatables.net/forums/comments.php?DiscussionID=566&page=1#Item_2
Is there any way i can accomplish the same? Has anyone tried it before?
Thanks so much.
Sincerely,
Yogesh
I will like to calculate totals for 3 of my columns and display it below respective column in footer. I see that via fnFooterCallback() there is provision to show only 1 at the moment.
There is a thread in which bjenkins has tried to do similar thing. However, I couldn't do the same in my code.
http://datatables.net/forums/comments.php?DiscussionID=566&page=1#Item_2
Is there any way i can accomplish the same? Has anyone tried it before?
Thanks so much.
Sincerely,
Yogesh
This discussion has been closed.
Replies
[code]
function (nRow, aasData, iStart, iEnd, aiDisplay ) {
$($(nRow).children()).remove();
for(var i=0;i
Thanks so much. Exactly what I was looking for. Thanks again for providing the code snippet.
Sincerely,
Yogesh
but i corrected an error when search result is 0
[code]
function (nRow, aasData, iStart, iEnd, aiDisplay ) {
$($(nRow).children()).remove();
if(iEnd > 0) { // if search result is empty do nothing
for(var i=0;i