Data table, select all pages (Table has 1,2, 3.. n pages) when clicked on Select all button
Data table, select all pages (Table has 1,2, 3.. n pages) when clicked on Select all button
nareshwer
Posts: 4Questions: 1Answers: 0
Hi,
When clicked on select all pages button I am getting all the rows available in data table and changing the bg color for all rows, but when user goes to next page records are not selected, only first page records are selected.
How to select all the pages when clicked on select button.
This discussion has been closed.
Answers
Hm, interesting... Does the select all on the example work for you? It works for me, as well as my installation of the select, I can select all and it selects all on all the pages.
Do this really quick if you can, to help us debug it: https://debug.datatables.net/
Hi jLinux,
Sorry for the late reply, I have tried other ways to do it but could not do it, here is the 6 letter code ukepic generated form DataTable debug for your ref.
Thanks in Advance.
this is code iam using for row bg color change.
for(var k = 0; k < this.Search.searchResult.dataRows.length; k++)
{
var rowid = this.Search.searchResult.dataRows[k][0];
Wait, youre using your own code to select them and/or change the bg colors?
yes, the code given in the previous post.
Well that definitely wont work... You have to use the DataTables API or the
select
button... DataTables literally removes the rows that arent visible from the DOM, so you wont be able to select them, since your code is going through the DOM..Just use the
select
.