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

KaizurKaizur Posts: 3Questions: 0Answers: 0

I want to remove the dropdown option from "show entries". And need to add checkbox.

Replies

  • kthorngrenkthorngren Posts: 20,144Questions: 26Answers: 4,736
    edited November 2022

    Use the dom option to remove the length change element, remove the l. You can create a customer toolbar element like this example with your checboxes. Then use the page.len() API to set the page length based on the checked chockbox.

    Kevin

  • KaizurKaizur Posts: 3Questions: 0Answers: 0

    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.

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    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

  • KaizurKaizur Posts: 3Questions: 0Answers: 0

    Hi Allan, Thanks for your comment. Already solved it.

Sign In or Register to comment.