-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract filtered records #33
Comments
Are you sure that you get only the first page? |
Yes Sir, only the viewable data. Unless I change the pageSize to say 20 then that is the only time i can get all the record. Btw I'm using jquery 1.12 and here's the code i use to extract the data.
|
I cannot reproduce... If you go to this page: http://holt59.github.io/datatable/ and type Could you add more details regarding your code? |
here's the html file i used using your sample table. Thanks for checking on this Sir. |
Yes, this is the expected behavior currently, but it's different from having a single page. |
In your code, you create a new $('#first-datatable-output table').datatable('select', true): |
I see, so the .all feature will extract data regardless of the filters used. Thanks for noting this and I'll try to create a function to extract only the filtered result. Any pointers would be very helpful. Thanks again. |
You can use the // Retrieve the datatable object from the element.
var dt = $('#first-datatable-output table')[0].datatable;
// Retrieve filtered data
var filteredData = [];
for (var i = 0; i < dt.filterIndex.length; ++i) {
filteredData.push(dt.data[dt.filterIndex[i]]);
} Not tested, but you get the idea. |
Noted and Thanks |
I reopen this to keep it on the TODO list. |
Good Day Sir,
Is there a way to extract all the table record, after filtering, etc, including the other paginated data?
Currently when using the datatable.all(true) option will only return the viewable part of the table but not the other data. Hoping for your response. Thanks.
Based on the screenshot below, I can only extract page 1 but i also need to extract pages 2 - 4.
The text was updated successfully, but these errors were encountered: