columns calculated, which sample recommend learn?
columns calculated, which sample recommend learn?
jamiguel77
Posts: 2Questions: 0Answers: 0
hi all my it is my first post .
wich sample see/learn recommend me for:
-initially I want a empty table, only headers(Qty/decimal, Description/String, Itemno/String, price/decimal, selected/Boolean or checkbox and Total(calculated qty*price)/decimal
-add a row
-edit a selected row
-delete selected row.
-insert a row
not like me this Table: http://www.jonathantneal.com/examples/invoice/
but want calculate(sum) to column: total how do this?(similar to invoice sample).
thanks.
This discussion has been closed.
Replies
hi friends, any comment?
thanks
Hi jamiguel,
You can have a empty table on page load. Provide a link say getReceipt and send a ajax request onClick function. You can populate your dataTable with Ajax response. For calculation of sum and other values you can use knockoutjs JavaScript librarry. Computed functions of knockout will solve your problem.
Check out this nifty piece of API:
http://datatables.net/reference/api/column%28%29.data%28%29
check this for SUM
http://datatables.net/examples/advanced_init/footer_callback.html