Style td on update?

Style td on update?

nathacofnathacof Posts: 2Questions: 0Answers: 0
edited October 2009 in General
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

Replies

  • allanallan Posts: 61,853Questions: 1Answers: 10,134 Site admin
    Hi nathacof,

    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
This discussion has been closed.