Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82213

How to add css style to dynamically generated row?

$
0
0

Hi,

I have a table like this.

var table = $('#example').DataTable();

Then I do this:
table.row.add(someInformation).draw();

I have tried: table.row.add(someInformation).addClass('success').draw();

But the above does not add the 'Success' class defined in my css file to the row that is appended to the datatable. Is that meant to do that? I see that in the addClass() documentation page, there is a legacy warning. Is there a newer way of doing this? I can't see to find anything other than addClass().

Thanks,
Anusha


Viewing all articles
Browse latest Browse all 82213

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>