Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82109

Change rowcallback after initialisation

$
0
0
I need to get my hands on existing datatable's fnRowCallback setting but everything I try seems to fail.

What have I tried:

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

and


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 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.

Viewing all articles
Browse latest Browse all 82109

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>