rowCallback() works with ajax call?
rowCallback() works with ajax call?
![vulkyrie](https://secure.gravatar.com/avatar/92117007dcb79bf5ed2a8bc26345b028/?default=https%3A%2F%2Fvanillicon.com%2F92117007dcb79bf5ed2a8bc26345b028_200.png&rating=g&size=120)
I want to highlight row based on condition.
If i put data in table manually rowcallback works, but when i try to get data from ajax call rowcallback does not work? Any solutions for this?
i tried row().data().each() but that is inconsistent
var table = $("#wo-dt").DataTable(
{
"ajax": 'operations.php?data=wodt'
},
{
"rowCallback": function( row, data ) {
alert("Working");
// if ( data[4] == "A" ) {
// $('td:eq(4)', row).html( '<b>A</b>' );
// }
}
}
);
This discussion has been closed.
Answers
Hi @vulkyrie ,
You're incorrectly passing two objects into DataTables. It should be: