Infinite Scrolling and Server-side Proccessing

Infinite Scrolling and Server-side Proccessing

Vidur1Vidur1 Posts: 6Questions: 1Answers: 0

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

  • allanallan Posts: 63,754Questions: 1Answers: 10,509 Site admin

    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

  • Vidur1Vidur1 Posts: 6Questions: 1Answers: 0

    Aaah, I see so there is no way to "mimic" this action? Pagination can only be done by the regular way?

  • allanallan Posts: 63,754Questions: 1Answers: 10,509 Site admin

    That is correct - sorry.

  • Vidur1Vidur1 Posts: 6Questions: 1Answers: 0

    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...

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    retrieve a page using a certain parameter

    What do you mean? "Pagination" means accessing pages via page numbers. If you want something else, you'll need to explain.

  • Vidur1Vidur1 Posts: 6Questions: 1Answers: 0

    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.

  • allanallan Posts: 63,754Questions: 1Answers: 10,509 Site admin
    Answer ✓

    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 the length parameter how many records. Combining start and length would give you the page number (i.e. start/length).

    Allan

  • Vidur1Vidur1 Posts: 6Questions: 1Answers: 0

    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....

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Answer ✓

    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.

  • Vidur1Vidur1 Posts: 6Questions: 1Answers: 0

    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...

This discussion has been closed.