Style td on update?
Style td on update?
Hey Guys,
I've got a scenario that I'm hoping I can get some help with. I've got a table which has styles applied to a specific column based on the status of the row item, indicating Open, Resolved, and Review.
I need to style the containing TD with a specific class; styling the content alone leaves portions of the TD without any color.
Anyone know how I can specifically target the containing TD within the fnRender function?
-nathacof
I've got a scenario that I'm hoping I can get some help with. I've got a table which has styles applied to a specific column based on the status of the row item, indicating Open, Resolved, and Review.
I need to style the containing TD with a specific class; styling the content alone leaves portions of the TD without any color.
Anyone know how I can specifically target the containing TD within the fnRender function?
-nathacof
This discussion has been closed.
Replies
Using the fnRender() function this isn't directly possible since it doesn't allow direct access to the node, as you have noticed. However, there are plenty of other ways to do it :-). Perhaps the most efficient way would be to use fnGetNodes() and then parse through the TR elements and apply the classes as required (or apply the classes before you have started the DataTables initialisation).
Regards,
Allan