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: 17,724Questions: 25Answers: 4,204
    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: 57,703Questions: 1Answers: 9,195 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.