How to refresh createdrow after edititing ?
How to refresh createdrow after edititing ?
Hello everybody,
I had used createdrow in order to affect a classname for some rows depending from values.
My problem is after editind a row with editor tools, the class didn't keep affect.
my code :
"createdRow": function ( row, data, index ) {
/* ajout des classes de label a la colonne état (colonne 6)*/
var dataEtatQualite = data.qualite.etat;
var classLabel = data.configurationEtats[dataEtatQualite].class;
$('td:eq(6)', row).html( '<span class="label ' + classLabel + '">' + dataEtatAction + '</span>' );
}
It works perfectly when loading the datatable but not after editing.
Thanks a lot for your help.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
Unfortunately this is a limitation at the moment - there is no update callback. Something I will be addressing in a future version. Until then, use
rowCallbackrather thancreatedRow.rowCallbackis called every time the row is displayed, so it is less efficient, but it will at least work.Allan
Hi Allan
thanks a lot it works, not really a problem for me to use rowCallback cause I've not a very large data to check.
Thanks a lot once again, wish you a nice day :-)