Added class to first column using fnRowCallback getting assigned to other column while colreordering
Added class to first column using fnRowCallback getting assigned to other column while colreordering

"fnRowCallback": function( nRow, data, iDisplayIndex ) {
if ( data["closedticketscount"] == "0" )
$('td:eq(3)', nRow).addClass( "ZeroTickets" );
else
$('td:eq(3)',nRow).addClass("numericCol ClosedTicketsCount");
if ( data["openticketscount"] == "0" )
$('td:eq(2)', nRow).addClass("ZeroTickets");
else
$('td:eq(2)',nRow).addClass("numericCol OpenTicketsCount");
}
But if I apply col reordering to column 3, it gets reordered then assigned css class to column 3 gets assigned to another column that has replaced column 3 which leads to wrong functionality.Is there any way to add class using column name or title ?
This discussion has been closed.