i have a table with 10000+ rows. I set in the settings, that only 100 rows per page are shown. So now i need the funtion, that when i set a filter and have may be 350 rows the copy-to-clipboard function copies all 350 rows and not only 100 rows of the view. Is this possible? May be with some changes in the source?
You can't use this option out-of-the-box, but there's a way to do it.
You need to open this file: ../wp-content/plugins/wpdatatables/templates/admin/table-settings/table_settings_block.inc.php and around line 348 you'll see this:
And you'll have that option in the "Display" tab above the table:
Then, open ../wp-content/plugins/wpdatatables/source/class.wpdatatable.php and around lines 3647 and 3650, and replace "All" with 1000, so it looks like this:
And the last thing to do is to go to line 542 of the same file, and modify it so it looks like this:
public function setDisplayLength($length) {
if (!in_array($length, array(1, 5, 10, 12, 20, 25, 30, 50, 52, 100, 200, 1000))) {
return false;
}
So, again, replace -1 with 1000.
You may also want to add the value in ../wp-content/plugins/wpdatatables/templates/admin/table-settings/column_settings_panel.inc.php around line 570, if you wish to add that value to possible column options (if you have a select-box filter or selectbox editor input type, this would be the number of values displayed in those drop-downs):
Hello,
i have a table with 10000+ rows. I set in the settings, that only 100 rows per page are shown. So now i need the funtion, that when i set a filter and have may be 350 rows the copy-to-clipboard function copies all 350 rows and not only 100 rows of the view. Is this possible? May be with some changes in the source?
Hello Stephan.
You can't use this option out-of-the-box, but there's a way to do it.
You need to open this file: ../wp-content/plugins/wpdatatables/templates/admin/table-settings/table_settings_block.inc.php and around line 348 you'll see this:
You can replace the last option (All) with the 1000 option, like this:
And you'll have that option in the "Display" tab above the table:
Then, open ../wp-content/plugins/wpdatatables/source/class.wpdatatable.php and around lines 3647 and 3650, and replace "All" with 1000, so it looks like this:
And the last thing to do is to go to line 542 of the same file, and modify it so it looks like this:
So, again, replace -1 with 1000.
You may also want to add the value in ../wp-content/plugins/wpdatatables/templates/admin/table-settings/column_settings_panel.inc.php around line 570, if you wish to add that value to possible column options (if you have a select-box filter or selectbox editor input type, this would be the number of values displayed in those drop-downs):
Please make sure to delete the cache in your browser after you apply the changes.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables