Can the Scroller be turned off and on dynamically?

Can the Scroller be turned off and on dynamically?

lynnelynne Posts: 3Questions: 0Answers: 0
edited September 2013 in General
Hi,

I've recently integrated the scroller extra and it is working great when we have fewer than, say, 2000 items. But, our server side processing is limited to loading items in sequential batches. For example, we cannot request data starting at offset 10,000, if we haven't already loaded items from 1-9999. (we have a legacy api system on the back end). Typically, we are loading smaller to medium result sets which we are sending data to the client caching, then we use the scroller to dynamically load and view the subset of the cached data.

So, for very large data sets, we'd like to turn off the scroller and turn on infinite scrolling so the table items will be loaded and viewed in a sequential order as the user scrolls down.

Can the scroller be turned off/disabled and the infinite scrolling turned on dynamically and then turned back on again? Or do we need to re-initialize the datatable when we detect the large dataset cases?

Thanks,
Lynne

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    No it can't be - sorry! You need to do exactly as you say and reinitialise the table, or otherwise up front know how big the data is.

    I should say that behind the scenes there is no difference between infinite scrolling and Scroller. You'll get no performance increase from infinite scrolling.

    Allan
  • lynnelynne Posts: 3Questions: 0Answers: 0
    Thanks Allan.

    I figured out how to make Scroller work like infinite scrolling 'pagination'. When returning the data to the datatable, I set the iTotalDisplayRecords to the number of retrieve results plus a buffer amount. So, when the user scrolls to the bottom, we will request the next batch of results, and so on and so on. I'm not sure why, but the datatable info still shows the total number of results, but also shows the artificially limited number of results being viewed (i.e. results are filtered). In any case, it works perfectly for our needs. Thanks again
This discussion has been closed.