I tried using what Allan suggested on this post, http://www.datatables.net/forums/discussion/181/fnadddata-and-add-class/p1
This works, but only so long as the row being added is currently in the scroller view (which make sense since it is merely looking for the latest row added to the DOM). Is there something else I can do to add a class to a row?
var newRowAdding = groupTable.fnAddData([ userData[0], userData[1], userData[2], userData[3] ]); var newRow = groupTable.fnSettings().aoData[ newRowAdding[0] ].nTr; if ($(this).hasClass('changed')) { newRow.setAttribute('class', ''); } else { newRow.setAttribute('class', 'changed'); }
This works, but only so long as the row being added is currently in the scroller view (which make sense since it is merely looking for the latest row added to the DOM). Is there something else I can do to add a class to a row?