Can We implement dynamic pagination on Client Side?
Can We implement dynamic pagination on Client Side?
viksnanu
Posts: 7Questions: 5Answers: 0
I have datatable implemented on my page. I am getting whole data using ajax call in one time as json and then displaying it on datatable. What I need here is, I want a dropdown which can change the number of records to be shown on my page and change the pagination accordingly. But i don't want to get the data on every change. I have whole data in one time, but i just want to change view dynamically. Can it be done in anyway here in datatable? Please help me with this.
This discussion has been closed.
Answers
Hi @viksnanu it seems what you're looking for can be found here:
DOM
.In your JavaScript where you initialise the table the
dom
attribute should be assigned something likeBlfrtip
rather thanBfrtip
- if you've pasted from examples, a lot of them don't include this.You may also need to add the attribute
"lengthChange": true
in the initialisation.e.g.
Shout if you need any more help!
The pagination control should automatically update for any changes in the page length options. That can be seen in this example.
Allan
Can we apply spinner to the same in anyway?
What spinner?