0

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.