aaData undefined

aaData undefined

keng_kgkeng_kg Posts: 2Questions: 0Answers: 0
edited September 2013 in General
Using library codeigniter

[code]
{"sEcho":0,"iTotalRecords":3,"iTotalDisplayRecords":3,"aaData":[["BFE-01-08-09-56","\u0e02\u0e49\u0e32\u0e27\u0e1c\u0e31\u0e14\u0e1b\u0e39","5","1","215","375.51","1","\u0e0a\u0e49\u0e2d\u0e19","8","edit"],["BFE-01-08-09-56","\u0e02\u0e49\u0e32\u0e27\u0e1c\u0e31\u0e14\u0e1b\u0e39","5","1","215","375","1","\u0e0a\u0e49\u0e2d\u0e19","8","edit"],["BFE-01-08-09-56","\u0e02\u0e49\u0e32\u0e27\u0e1c\u0e31\u0e14\u0e1b\u0e39","5","1","215","375","1","\u0e0a\u0e49\u0e2d\u0e19","8","edit"]]
[/code]

[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]

[code]
$("#datatables1").dataTable({
"bProcessing": true,
"bServerSide": true,
"sDom": "<'row-fluid'<'span6'T><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"sAjaxSource":"http://localhost/master-cms/site/database",
"sServerMethod": "POST",
"iDisplayLength": 10,
"bLengthChange": true,
"sScrollX": '100%',
"sScrollXInner": "1000px",
"bScrollCollapse": false,
"bAutoWidth": false,
"sScrollY": "50%",
"bDestroy": false,
"aoColumns":[
{
"mData": "stock_id", "sWidth": "10%"
}, //playerID is hidden
{"mData": "stock_list", "sWidth": "10%"
},//lastnme
{"mDataProp": "stock_unit", "sWidth": "5%"
},//firstnme
{"mData": "stock_qty", "sWidth": "5%"
},//dob
{"mData": "stock_weight", "sWidth": "5%"
},//avail
{"mData": "stock_price", "sWidth": "5%"
},//avail
{"mData": "stock_catagorie", "sWidth": "5%"
},//avail
{"mData": "stock_product_free", "sWidth": "5%"
},//avail
{"mData": "stock_in_datetime", "sWidth": "5%"
},//avail
{"mData": "action", "sWidth": "5%", "bSortable": false
}
],
"oTableTools": {
"aButtons": [
"copy",
"print",
"csv",
"xls",
"pdf"
]
},
"fnFooterCallback": function( nFoot, aaData, iStart, iEnd, aiDisplay ) {
nFoot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+iStart;
console.log(aaData); <----- undefined
}
})
[/code]

Replies

  • allanallan Posts: 63,201Questions: 1Answers: 10,415 Site admin
    Footer callback is fired once before the data is got from the server - for an initial state draw while the data is retrieved.

    Allan
This discussion has been closed.