server_side add class to row
server_side add class to row
tweekzilla
Posts: 1Questions: 0Answers: 0
Hi everyone
I'm trying to hack together a nice table using the themes.html example and server_side processing. This should be really simple but I need to add class="gradeA" to each of the rows as they come in from the server. I tried doing this but it doesn't work - any help would be much appreciated.
[code]
"fnRowCallback" : function(nRow,aData,iDisplayIndex) {
$('tbody tr').each( function() {
$(this).addClass('gradeA');
});
return nRow;
},
[/code]
I'm trying to hack together a nice table using the themes.html example and server_side processing. This should be really simple but I need to add class="gradeA" to each of the rows as they come in from the server. I tried doing this but it doesn't work - any help would be much appreciated.
[code]
"fnRowCallback" : function(nRow,aData,iDisplayIndex) {
$('tbody tr').each( function() {
$(this).addClass('gradeA');
});
return nRow;
},
[/code]
This discussion has been closed.
Replies
[code]
"fnRowCallback" : function(nRow,aData,iDisplayIndex) {
$(nRow).addClass('class_name');
return nRow;
},
[/code]