PDA

View Full Version : Infinite scrolling without providing total dataset size



zizoro
22 Aug 2012, 8:10 AM
Using the Ext 4 virtual scrolling mechanism for a grid, is there a way to do it without providing the total dataset size? We have a case where we are displaying lots and lots of data from a cloud source, but we do not know the total dataset size. It seems that the virtual scrolling feature depends on this total dataset size, and without it, paging of the data in the grid does not work, only the first page is fetched and displayed. (The total dataset size is the "<span style="white-space: pre-wrap; ">totalProperty</span>" of the reader object used when fetching the data. See the infinite scrolling example at http://docs.sencha.com/ext-js/4-1/#!/example/grid/infinite-scroll.html, browse the code to see use of the "totalProperty"). It seems that the framework could have options to tell it to keep fetching data and have a mechanism for detecting "end of dataset" (e.g., when fewer than one page's worth of data is returned or if HTTP 404 status is returned). Does anyone have a solution or know of any workarounds for this?