Reputation: 411
I need a help for jquery.dataTables.js
Here is my specific requirement. Initially the table showing 10 rows. This is good. But I want to add one additional link called "View all". When I clicks on that, entire rows should get showed. How can I?
Does anybody knows?
Upvotes: 0
Views: 154
Reputation: 493
You can do this by modifying the datatable's lengthMenu option to be something like
[[10, 25, -1], [10, 25, "All"]]
The elements of the first array dictate how many entries will be displayed per page ("-1" means "all"), the elements of the second are what will be shown to the user.
Note that this adds the "view all" option to the "[x] entries per page" dropdown, not as a separate link somewhere else in the table - I'm not sure from your question if it matters exactly where the "view all" option is.
Upvotes: 1