I need to access the existing fnRowCallback parameter, but everything I try seems to fail.
What I tried:
1
var dt = $('#table').dataTable({
"bRetrieve": true,
"fnRowCallback" : function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
console.warn("working");
}
);
2:
var dt = $('#table').dataTable({"bRetrieve": true});
dt.fnSettings().fnRowCallback = function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
console.warn("working");
}
No luck, but if I change
var dt = $('#table').dataTable({"bRetrieve": true});
dt.fnSettings().sAjaxSource = "invalid url";
I am getting an error so it seems to work. Also, if I do fnRowCallback in the initial datatable initialization, it works, but that is not what I want.
source
share