Adding multiple footer callback to multiple columns

Adding multiple footer callback to multiple columns

bchiprebchipre Posts: 20Questions: 8Answers: 0

Here is an example which I tried to get multiple footer callback function on multiple columns.
It does not render/calculate the totals on any columns. No idea what I am missing. Earlier a similar Qn was asked earlier to append the footer callback in toolbar (https://datatables.net/forums/discussion/60744)

Here is the test case tried : http://live.datatables.net/yebujini/1/edit

@allan, @kthorngren can you let me know whether it is possible to apply multiple footer callback functions in datatables ?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 14,122Questions: 25Answers: 3,329
    Answer ✓

    You need to update the HTML of the toolbar div like the working example in the thread you linked,. From the example:

               $( "div.toolbar" ).html(
                    '$'+pageTotal +' ( $'+ total +' total)'
                );
    

    I updated your test case to show this:
    http://live.datatables.net/yebujini/2/edit

    You will need to format the output the way you want.

    Kevin

  • bchiprebchipre Posts: 20Questions: 8Answers: 0

    Thanks a ton ! @kthorngren Working perfectly. Applied this on my three columns and getting great results.

    Datatables Rocks ! ! !

Sign In or Register to comment.