Get the sum of a column using Footer Callback?

Get the sum of a column using Footer Callback?

chadspjut2chadspjut2 Posts: 1Questions: 1Answers: 0

Hi,

The example here is just not helping me because I am so new at this. I can't seem to think through the code as I am both new to this and haven't been programming in several months. All I need is to be able to add the footer callback that is shown in this example (https://datatables.net/examples/advanced_init/footer_callback.html) to sum up the total column. I tried to put an example of my code in live view here even though I am actually using ajax.

http://live.datatables.net/hokaluda/1/edit?html,js,output

How to I incorporate the code properly from the example in to what I have?

Any help is greatly appreciated!

Answers

  • allanallan Posts: 64,106Questions: 1Answers: 10,574 Site admin

    Hi,

    Thanks for our message. I don't actually see any code for the summation of columns in the link you give. Have you tried simply copying the code from the footer callback example (updating the column index to be suitable for your use)? The main part is the footerCallback option.

    For details on how to use options, see this manual page.

    Allan

This discussion has been closed.