Change rowcallback after initialisation

Change rowcallback after initialisation

sormisormi Posts: 1Questions: 0Answers: 0
edited December 2012 in DataTables 1.9
I need to get my hands on existing datatable's fnRowCallback setting but everything I try seems to fail.

What have I tried:

[code]
var dt = $('#table').dataTable({
"bRetrieve": true,
"fnRowCallback" : function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
console.warn("working");
}
);
[/code]

and

[code]

var dt = $('#table').dataTable({"bRetrieve": true});

dt.fnSettings().fnRowCallback = function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
console.warn("working");
}
[/code]

No luck, but if I change

[code]
var dt = $('#table').dataTable({"bRetrieve": true});
dt.fnSettings().sAjaxSource = "invalid url";
[/code]

I get an error so that one seems to work. Also if I do fnRowCallback in the original datatable initialisation it works, but that's not what I want.
This discussion has been closed.