Sum up all Column entries
Sum up all Column entries
redsunset
Posts: 44Questions: 15Answers: 0
Hi all!
I would like to sum up all values in a specific column and display the updated result after each filter automatically.
Is that possible? Any hints would be awesome.
best greetings and thank you in advance,
Pascal
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Maybe this recent thread will help:
https://datatables.net/forums/discussion/comment/142383/#Comment_142383
Kevin
thanks!
do you have any example snippets?
The code example is in the link I provided:
https://datatables.net/examples/advanced_init/footer_callback.html
As I mentioned you would use a
type selector-modifier
of{search: "applied"}
. Changing the code for// Total over this page
to use this selector would look like this:Kevin
so this would give me a sum of all integer values of column 4?
Column numbers start counting from 0 so that would be the fifth column in the table. If you want to verify it works take the code from the Footer Callback example and try it in a test case here: http://live.datatables.net/
Kevin