extract fraction value
extract fraction value

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
implemented row grouping with totals.
I want to extract fraction value of each row and multiply that value with 0.6.
Ex:
col value: 38.78
result should be: 38.46 (0.78 * 0.6).
How to do this?
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Not sure exactly what you are looking for but this example shows how to aggregate row data by iterating all the rows(the
rows
parameter) in the group. Change the Javascript to calculate the data the way you want.If you still need help with this please build a simple running test case with an example set of your data so we can help structure your code.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Do you really want 38.46? I mean .78 * .6 is .47 rounded and not .46.
This code alerts 0.47 ("dec") and 38.47 ("newVal"):
This code alerts 0.46 ("dec") and 38.46 ("newVal"):
Thanks to all of you,
I've developed simple JS function and call inside rowGroup...
Regards,
ßhavin.