Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81728

Multiply values and apply style in Datatables

$
0
0

Dear community,
I would like to understand how to multiply column values and apply style in Datatables.

Currently my columns section looks like this :

"columns": [
{ data: "id" },
{ data: "brand" },
{ data: "description" },
{ data: "nb_ref" },
{ sortable : false, data: "cost", render: $.fn.dataTable.render.number( ' ', '.', 2, '€' ) },
]

what I would like in the 5th column is to multiply the "cost" by the "nb_ref" (the value of the 4th column) and still apply the number format.

Any idea about how to achieve ?

thanks

Adam


Viewing all articles
Browse latest Browse all 81728

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>