You could simply repeat the code that sums each column and populates the footer. A better option might be to use columns().every() to loop through the desired columns. The last example shows one way to do this.
on datatable search
Use a selector-modifier to only sum the rows that are shown after searching. For example change .column( 4, { page: 'current'} ) to .column( 4, { search:'applied'} ).
Replies
I assume you have seen this example:
https://datatables.net/examples/advanced_init/footer_callback.html
You could simply repeat the code that sums each column and populates the footer. A better option might be to use
columns().every()
to loop through the desired columns. The last example shows one way to do this.Use a
selector-modifier
to only sum the rows that are shown after searching. For example change.column( 4, { page: 'current'} )
to.column( 4, { search:'applied'} )
.Kevin