createdRow and rowCallback not aware of data changes in Success callback

createdRow and rowCallback not aware of data changes in Success callback

demegodemego Posts: 4Questions: 2Answers: 0

Hi everyone,

My datatable is using serverSide mode, im fetching table data and then, on dataFilter callback doing a diff with existing entries, then, inside dataFilter callback i change an attribute of my data, ex:

"dataFilter": function(resp) {
                
   ...resp.order.modified = true;
   return resp;
}

and then i add some css to my rows depending on this attribute ex:

 "createdRow": function(row, data, index) {

    if(data.modified) { //BUT, ...data.modified is always false here
         $(row).css("background-color", "#bdcdea"); 
    }
   
 },

the problem is that createdRow callback is not aware of these changes, it uses what it gets from the server only, why is that so? data should have my changes if i modify it.

Answers

  • demegodemego Posts: 4Questions: 2Answers: 0

    nevermind seems like I've made mistake setting data back to response...

This discussion has been closed.