Deferring server-side loading of all data

Deferring server-side loading of all data

comptech1comptech1 Posts: 3Questions: 0Answers: 0
edited March 2013 in General
I have ~10k rows and if the user chooses 'all rows' from the length dropdown, it breaks the javascript engine's back. I'd like to break this up into multiple ajax requests/draw events instead of one big one. As in, draw 100 rows at first; once that's complete, retrieve/draw the next 100, etc..

Basically I'd like to load data like 'bInfiniteScroll' does, but without scrolling.

If anyone knows how I could achieve this, please share.

Replies

  • GregPGregP Posts: 500Questions: 10Answers: 0
    I'm not sure if this answers your question, but it's built-in functionality for DataTables. If you set "bServerSide" to true, it's up to your back end to handle all the pagination details and return them as appropriate variables (see this section of the site: http://www.datatables.net/usage/server-side).

    So, what you're asking is sort of two things convolved: "give me all the data", "but give me only pieces". You can't see both all and portions at a time.

    What you described is really the fact that the user should be disallowed from requesting "All" of the data, since it's too much to exchange. If you want to request all the data but then only render in pieces, you're really just asking for paginated data. In which case, disallow "All" and work with a maximum page size.
This discussion has been closed.