How to automate the sum the value of my column whenever the user filter the data in the table
How to automate the sum the value of my column whenever the user filter the data in the table
Thomas Willjohn
Posts: 2Questions: 1Answers: 0
in DataTables
This is the code of my table of my web
This is the code for the footer callback, but I really don't get any results
This is the picture of my table
I just really don't know what should I do cause I am not really good at this
Answers
Sounds like you want to use the
selector-modifier
of{search: "applied"}
. Similar to the way {page: "current"} is used for thepageTotal
.Kevin
yes, it just that, in the footer it doesn't return any total value of my column
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Looks like your numbers are something like this
P 100.00
. You will need to remove theP
. You can try changingi.replace(/[\$,]/g, '')*1 :
to this:If this doesn't help then provide the test case Colin asked for.
Kevin