Footer Callback
Footer Callback
I am trying to lear how to use a footer callbak, I did use the same code showed in the example but I came up with NaN it seems that aaData is empty ,
The code is:
"sDom": "Tflrtip",
"aoColumns": [
{"mData": "fecha"},
{"mData": "idstaff"},
{"mData": "staff.nombre", "sDefaultContent": " "},
{"mData": "idproyecto"},
{"mData": "proyectos.codigoee", "sDefaultContent": " "},
{"mData": "cantidad"}
],
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
var iTotalhh = 0;
for ( var i=0 ; i
The code is:
"sDom": "Tflrtip",
"aoColumns": [
{"mData": "fecha"},
{"mData": "idstaff"},
{"mData": "staff.nombre", "sDefaultContent": " "},
{"mData": "idproyecto"},
{"mData": "proyectos.codigoee", "sDefaultContent": " "},
{"mData": "cantidad"}
],
"fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
var iTotalhh = 0;
for ( var i=0 ; i
This discussion has been closed.
Replies
Allan
I have to use aaData[1]['cantidad'] instead of aaData[1][5].....I could not use number as index...do not know why.
On the other hand the calculation of the "total" including the rows outside the pagination does not work.
Is that happening because the server side?? can I solve it??
> Is that happening because the server side??
If you are using server-side processing, then yes. The full data set is not available at the client-side, so of course it cannot calculate the full total. If you want the full total, you need to have the server calculate it.
Allan