How to refresh createdrow after edititing ?

How to refresh createdrow after edititing ?

smassotsmassot Posts: 28Questions: 9Answers: 1

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

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    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 rowCallback rather than createdRow. rowCallback is called every time the row is displayed, so it is less efficient, but it will at least work.

    Allan

  • smassotsmassot Posts: 28Questions: 9Answers: 1

    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 :-)

This discussion has been closed.