How to add checkbox option instead of dropdown for "show entries" in Datatable header
How to add checkbox option instead of dropdown for "show entries" in Datatable header
Kaizur
Posts: 3Questions: 0Answers: 0
I want to remove the dropdown option from "show entries". And need to add checkbox.
Replies
Use the
dom
option to remove the length change element, remove thel
. You can create a customer toolbar element like this example with your checboxes. Then use thepage.len()
API to set the page length based on the checked chockbox.Kevin
Hi kthorngren, Thank you for your valuable answer. But, I am not used to in Datatable. Can you write the whole code for me? please.
You just need to bind event listeners to your checkboxes which calls the
page.len()
method Kevin mentioned. If you need someone to write the code for you, we provide priority support or I'm sure a freelancer would be able to do it.Allan
Hi Allan, Thanks for your comment. Already solved it.