Select rows for all pages in a search subset
Select rows for all pages in a search subset
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: Hi, I have an issue where I set a button to select all rows using table.rows( { page: 'all' } ).select();. But if I do a search for say 40 out of 100 results, and hit that button and check how many rows are selected using dataTable1.rows({ selected: true }).data(); it returns all 100 rows, not just the 40. The correct subset of 40 rows seems to be selected on all pages when I navigate through the pages after I hit the selectall button. Please advise if there is another parameter apart from page: 'all' and page: 'current' that only selects the rows in pages displayed.
This question has an accepted answers - jump to answer
Answers
I'm reading data from the DOM
I'm trying to progress with this and trying to iterate through the rows shown after a search and trying to select them:
objRows holds the rows from the search results but next is to select them in code. I can't find how this is done: how would i iterate through the objRows object or 'bulk' select them directly via some .select() method? Many thanks.
Use the
selector-modifier
of{ search: 'applied' }
, for example:table.rows( {search: 'applied'} ).select();
Here is a running example:
http://live.datatables.net/rowidovi/1/edit
Is this what you are looking for?
Kevin
Many thanks. Will try this.