DataTables/DataTables — pull request #58 by danut007ro (2012-04-17 08:14:47+00:00)
Title: New callback fnRenderAfter

I added a new callback named fnRederAfter that will be defined for every column and called for every cell, but AFTER the cell was created. It passes two parameters:

An object with the following properties:

iDataRow
iDataColumn
aData
oSettings
mDataProp
nTd
nTr

, and cell data (retrieved using _fnGetCellData)

A very simple example on how to use it :

fnRenderAfter: function(oObj) {
// jQuery cell element
var cell = jQuery(oObj.nTd);
var row = oObj.nTr;

var span = jQuery('');
switch (oObj.aData.status) {
case '0': // pending
span.css('color', '#0000FF').text('Pending');
break;
case '1': // completed
span.css('color', '#FFC828').text('Completed");
break;
}
cell.html(span.css('font-weight', 'bold'));
}