Sum of the product of 2 columns
Sum of the product of 2 columns

Hi,
I have a 2-column table. Column "quantity" and "per Unit". For each row I want to multiply "quantity" by "per Unit", then sum all of that, then update at the footer. I could not find any example, struggle for few days already. I suspect that I could use columns().data() but don't know how to apply. Basically reduce from 2 dim to 1 dim then to single value.
Appreciate for any help. Thanks.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Maybe this discussion will help:
https://datatables.net//forums/discussion/comment/82396/#Comment_82396
Kevin
I did it this way http://jsbin.com/putiyep/edit?js,output
Thanks bindrid. Beautiful.