How would one keep old rows when using Scroller and bServerSide?
How would one keep old rows when using Scroller and bServerSide?
Hello, my question is pretty simple. Right now, if one uses the Scroller and [code]"bServerSide": true[/code], then new data will be loaded as you scroll. However, upon scrolling down for new data, the old table rows are thrown away.
Is there a way to allow Scroller to keep the old rows? That way, upon scrolling back up, one will not need to hit the server again to get the data (whose filtering and sorting have not changed) that was just received seconds ago.
Is it possible to use the Scroller to defer the loading of the data (so the UI looks responsive) but keep the rows once created (assuming the filter and sort hasn't changed)? Am I missing something here (using DataTables 1.9.4 and Scroller 1.2.0)?
Is there a way to allow Scroller to keep the old rows? That way, upon scrolling back up, one will not need to hit the server again to get the data (whose filtering and sorting have not changed) that was just received seconds ago.
Is it possible to use the Scroller to defer the loading of the data (so the UI looks responsive) but keep the rows once created (assuming the filter and sort hasn't changed)? Am I missing something here (using DataTables 1.9.4 and Scroller 1.2.0)?
This discussion has been closed.
Replies
Correct - that's how server-side processing operates. It will only hold a reference to the rows that it needs for the current display. There is no way around that when server-side processing is enabled.
The closest you would get is something like the pipelining demo: http://datatables.net/release-datatables/examples/server_side/pipeline.html
Allan
I see that the pipelining could work. Basically, say your first call is (0,50), when the user scrolls down, you can just fake the next call to be (0,100)? That seems like it should work.
However, I am dealing with a maximum of 2000 rows here, so (I saw a thread where this was not possible in 1.6.X) is there a way to override the private methods (like _fnSort/_fnFilter)?
Thanks!
Allan
Allan
Really, I can get all the data at once...I just want to do the sort and filter completely manually.
So, in the end...I don't care whether I have bServerSide true or false, I just want to completely own the sort and filter logic (which is why I used bServerSide true, because it seems like the fastest way to put the logic in my own hands)...but I would also like to not have to wait for the 2-4 second draw.
So, is there a good example of bServerSide false where I can do all of the sort and filter logic myself? :)
For the other 1% you can use completely custom sorting. A bt more tricky, but you can sort the table in any way you want: http://datatables.net/development/sorting#data_source
Filtering has similar options: http://datatables.net/development/filtering
However, if the built in methods are good enough with orthogonal data, then I'd say that is a good way to go.
Allan