Child Row Conditional Formatting
Child Row Conditional Formatting
This test case has child rows that are all open after the table loads:
live.datatables.net/voyanulo/1/edit
Every child row has an "extn_class" which I would like to use to control the text color of the last numerical part of the child row (the remaining text of the child row should stay red). My goal is to change the text color to orange if Extn >= 5000. For main rows this is controlled by using 'createdRow' and "$(row).find('td:eq()')", but I'm not sure how to do this for child rows analogously.
This question has an accepted answers - jump to answer
Answers
Datatables doesn't know about this row so things like
createdRow
won't have access to it. You are using the format function to display adiv
with the output. You will need to place logic in the format function to manipulate the HTML you want to display /return
for display.Kevin
This works- thank you for guiding me in the right direction!