How to dynamically add a row and keep custom classes for td's

How to dynamically add a row and keep custom classes for td's

camainccamainc Posts: 19Questions: 3Answers: 0
edited May 2011 in General
I have some tables that need custom classes on the td's. When I initially build the table from server-side data, this is not a problem. However, when I want to update the table with new data from a ajax call using the fnAddData() method, I don't see how to add my custom classes to the td elements of the new row.

What ends up happening is that part of my table is styled correctly, and the newly inserted rows are not styled correctly.

How can I achieve this desired functionality?

Thanks

Replies

  • camainccamainc Posts: 19Questions: 3Answers: 0
    I figured it out. I set the class names in the "aoColumns" options, and then when I added a row dynamically, the columns picked up the new classes.
This discussion has been closed.