DataTables _fnCallbackReg how to use

DataTables _fnCallbackReg how to use

babablacksheepbabablacksheep Posts: 41Questions: 23Answers: 0
edited January 2018 in Free community support
  1. I am trying to write a datatables plugin
  2. I am stuck where I am using _fnCallbackReg to hook into aoRowCreatedCallback

Below is the sample short code and should work.

I need to know how can i use _fnCallbackReg correctly for writing plugins

JSFIDDLE: https://jsfiddle.net/bababalcksheep/fsv0tLn3/2/

(function(window, document, $, undefined)
 {
     $(document).on('init.dt', function(e, oSettings)
     {
         var tCreated = function(row, data, dataIndex)
         {
             console.log('row', row);
             return 's';
             //$(row).addClass('test') ;
         };
         oSettings.oApi._fnCallbackReg(oSettings, 'aoRowCreatedCallback', tCreated, 'user');
     });
 })(window, document, jQuery);
This discussion has been closed.