Footer update
Footer update
ahmad71666
Posts: 1Questions: 0Answers: 0
I want to apply sum on multiple coloumn on datatable search how to do it?
This discussion has been closed.
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