Infinite Scrolling and Server-side Proccessing
Infinite Scrolling and Server-side Proccessing
Hello!
I've been trying to use Infinite Scrolling and server-side processing for the past couple days and I have the server-side all set up with queries such as paging, filtering and sorting. But I cannot figure out how to send the certain query when the action is placed. I've looked up and down the forums for a solution similar to mine yet I've came to no conclusion.
Does anyone know where I can find such a solution or could point me in the right direction?
I'm using the SCROLLER extension to try to make this work also, not sure if that will hinder the performance or make it easier.
Thanks,
Vidur
This question has accepted answers - jump to:
Answers
DataTables does not support infinite scrolling. It did in 1.9, but was removed in 1.10 due to the complexity and issues that it introduced.
Allan
Aaah, I see so there is no way to "mimic" this action? Pagination can only be done by the regular way?
That is correct - sorry.
Thanks for all your help, I have one more question then if you are able to answer.
I want to implement serverside paging, but I dont see anything where I can set the datatable to retrieve a page using a certain parameter, is this possible? Is there an example that i could see? I tried looking for some but didnt find anything...
What do you mean? "Pagination" means accessing pages via page numbers. If you want something else, you'll need to explain.
Sorry if its unclear, sort of new to all this. But basically I've created a query with the parameter "page", which brings up x amount of items, that was specified. I want to retrieve this response (which works) and display it in the datatable. I'm just unsure if it's an incorrect parameter, or something is the issue... Sorry if it's still unclear, I could pop some code in if it helps out.
DataTables server-side processing parameters are detailed in the documentation. Specifically the
start
parameter tells the server where DataTables wants the data to start from, and thelength
parameter how many records. Combiningstart
andlength
would give you the page number (i.e.start/length
).Allan
Thanks sorry for asking so many questions, just been running into lots of issues. I'm getting "stuck" at the data-table reprocessing again, but I have the correct JSON response. It just doesn't redraw properly. I'm doing research in this, but I keep getting legacy results....
Your issue would be dealt with more readily if you provide a link to a page showing the problem, as required by the forum rules.
Hmm sorry... I will provide that next time if I run into any more issues. Sorry for being such an inconvience! I was able to figure it out, I was re-creating the "draw" field in my JSON response. So it was creating issues. Thanks SO much for your guys help. Sorry again...