Themeroller not working on table created on server

Themeroller not working on table created on server

mbostlemanmbostleman Posts: 2Questions: 0Answers: 0
edited August 2012 in DataTables 1.9
I have two tables on my page, one that is populated with fnAddData on the client and another that is populated on the server. The Themeroller layout works the one populated on the client but not the one populated on the server. Also, I know that the table populated on the server works with the layout because if I populate it on the client it works too. How can I get a table populated on the server to get the style from Themeroller?

Replies

  • mbostlemanmbostleman Posts: 2Questions: 0Answers: 0
    I've resolved this. I am using Asp.Net Web Forms and there were two issues.

    The first is that my table's Id value was getting prepended with other values when the page was rendered so I wasn't even referencing the correct Id. That was easy to fix.

    The second was that I was using the HtmlTableRow class to populate the table and this does not render thead and tbody tags. So I switched to an asp:table server control and used the TableRow class. With this, I could set each row's TableSection property to TableSection.TableHeader or TableSection.TableBody prior to adding to the table's rows collection and the thead and tbody were rendered again.
This discussion has been closed.