Setting visible rows selected
Setting visible rows selected
Wakaru
Posts: 13Questions: 5Answers: 0
Hi,
Is there an option to set all visible row's status to selected (ie. <tr class "selected"> for the each of the row) while rendering the datatables? I already have the "Select all" button and that works fine, but I really need to get those rows to be selected as a default option.
Thanks!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You just want to add a class, or are you using a row selection plug-in such as TableTools. To add a class you could use the
rows()
method like:table.rows( { page: 'current' } ).nodes().to$().addClass( 'selected' );
.Allan
Table Tools worked for me:
var oTT = TableTools.fnGetInstance( 'example' );
oTT.fnSelectAll();
Thanks!