How to add a button after show Entries and how dataTable result will refresh after click on button.
How to add a button after show Entries and how dataTable result will refresh after click on button.
Anup Roy
Posts: 3Questions: 1Answers: 0
in DataTables
Hello, I have one requirement and here is the details. I want to add one button(Go) after "Show Entries". Once user select number of entries from drop down and click on Go button, datatable result need to refresh based on number selected. Could you please help me to resolve and let me know if you need any details.
Please note, Unless user click on Go button datatable result should not refresh.
This question has an accepted answers - jump to answer
Answers
Sounds like you should create your own length change input. Use the
dom
option to remove the default length change option or set thelengthChange
to false.You button click event will use
page.len()
to set the page length.You can use the technique in the Custom toolbar element example to display your custom element with the Datatables elements.
Kevin
I am looking something like below.
Understood, Do you have questions about the above recommendations?
I guess you can turn off the Datatables
change
event and use the button to get and set the page length. Something like this:http://live.datatables.net/sipesuyo/1/edit
Kevin
Thanks Kevin, it worked for me.