Enable Footer when creating a Table from scratch

Enable Footer when creating a Table from scratch

OscarEduardoOscarEduardo Posts: 1Questions: 0Answers: 0
edited July 2013 in DataTables 1.9
I'm using DataTables and it is perfect. But I recently changed my code to create them dinamically, so I just create an empty table and initialize it using aoColumns and mData, like this:

[code]
aoColumns: [
{ mData: function(source) { return source.get(crewHuObjMaps.Branch.branchName);
}, sTitle: "   Name" },
{ mData: function(source, type) {
var pointsBudget = source.get(crewHuObjMaps.Branch.pointsBudget);
if (type === "display") {
return globalConfigs.budget_control_enabled ? (pointsBudget ? (formatZeroDecThSep(pointsBudget) + '/month') : 'none') : 'unlimited';
} else {
return globalConfigs.budget_control_enabled ? (pointsBudget ? pointsBudget : 0) : 0;
}
}, sTitle: "Points Budget", sClass: "crud-number", sWidth_NOTUSED: "110px", sType: "numeric" },
{ mData: function(source, type) { return (type === "display" ? buildCRUDButtons(source.id, true) : '');
}, sTitle: buildCRUDAddButtonBranches(), sClass: "crud-right-buttons", bSortable: false }
]
[/code]

My simple question is: how do I set Datatables to create a FOOTER in this situation ? Because I need some totals, so I'll be using fnFooterCallback. But right now I can't even use a static footer.

Thanks !!
This discussion has been closed.