I have a datatable that is created with Ajax. However, I do not want all the fields to be displayed and thus I set bVisible to false on the not-so-important field.
On the Datatables v1.10.x I've used this method:
Column definition:
"columnDefs": [
{ "data": "yourColumnId", "targets": 0, "visible": false
]
And then in my function...
var rows = $("#tbl").dataTable().fnGetNodes();
for (var i = 0; i < rows.length; i++) {
id = $("#tbl").dataTable().fnGetData(i).yourColumnId;
}
I prefer this method instead of the:
id = $(rows[i]).find("td:eq(0)").html();