Change pagelength options with button

Change pagelength options with button

NakrimeNakrime Posts: 2Questions: 1Answers: 0

Hello everyone,
Recently I was tasked with getting the excel button to export everything regardless of what the length setting is set on, I know about putting the length to all and then exporting but this is seen as a "workaround" and I was asked to always have the button export all.

Sadly the datatable is set to serverside and changing that would break the website so I can't just use the "page: 'all'," exportoption.

My current idea is to add a button that basically does the "workaround" mentioned above automatically, that is a button that sets the length to show all then presses the export button, sadly I can't seem to be able to change Page length options with a button seperate from the table with js so I need some help.

If you can tell me how to have my excel export button export all regardless of it being serverside or not or a way to have my button do the "workaround" or point me towards the solution somewhere else it would be great.

You can use this page to test https://datatables.net/examples/advanced_init/length_menu.html

Thank you

This question has an accepted answers - jump to answer

Answers

Sign In or Register to comment.