I need calculate total and sum show in footer. Use datatables libraries of codeigniter
I need calculate total and sum show in footer. Use datatables libraries of codeigniter
Controller:
[code]
$this->datatables->select("stock_id, stock_list, stock_qty, stock_unit, stock_weight, stock_price, stock_catagorie, stock_product_free, stock_in_datetime")
->add_column("action","Edit")
->from("tb_stock");
echo $this->datatables->generate();
[/code]
Script:
[code]
$(function(){
$("#datatables1").dataTable({
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
/*
* Calculate the total market share for all browsers in this table (ie inc. outside
* the pagination)
*/
var iTotalMarket = 0;
for ( var i=0 ; i
[/code]
I understand make calculate total and sum
Thank very much
[code]
$this->datatables->select("stock_id, stock_list, stock_qty, stock_unit, stock_weight, stock_price, stock_catagorie, stock_product_free, stock_in_datetime")
->add_column("action","Edit")
->from("tb_stock");
echo $this->datatables->generate();
[/code]
Script:
[code]
$(function(){
$("#datatables1").dataTable({
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
/*
* Calculate the total market share for all browsers in this table (ie inc. outside
* the pagination)
*/
var iTotalMarket = 0;
for ( var i=0 ; i
[/code]
I understand make calculate total and sum
Thank very much
This discussion has been closed.