Select only displayed rows in Jquery Multiple DataTables
Select only displayed rows in Jquery Multiple DataTables
ayush1795
Posts: 3Questions: 1Answers: 0
I have multiple Jquery Datatables (number of table is dynamic). I have created multiple tables with the help of
$(document).ready(function() {
$('table.display').DataTable();
} );
I want to add select and deselect all button which will select and deselect only visible rows.
What code should I add so that these buttons are added into all tables.
thanks
This discussion has been closed.
Replies
Hi @ayush1795 ,
This example here shows what you need to do.
Cheers,
Colin
@colin , Thank you but I have multiple tables and number of tables are not fixed. The example you gave me works for only one table. help me out
Hi @ayush1795 ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
This is a custom button that does what you need. If you also want to select invisible data tables and to ignore filtering (i.e. also select rows that are filtered out) modify as per your requirements.