PDA

View Full Version : Display info for infinite grid



xun
9 Jul 2012, 5:54 PM
I wonder if and how I can get some general info for an infinite/buffered grid in the form of
Display x to x of total XX records.

As in the following.


36988
Thanks

scottmartin
9 Jul 2012, 6:39 PM
Perhaps this article can help explain how it works .. the example (grid-tuner) may also help:
http://www.sencha.com/blog/optimizing-ext-js-4-1-based-applications/

Scott.

xun
10 Jul 2012, 6:36 AM
This is all very good. Thank you.

But to cut the chase, what is the specific way to get exactly the information as we scroll? The start record, end record in view?

Thanks a lot

xun
10 Jul 2012, 7:20 AM
went back to the page turner example. it does tell me the number of rows, pages fetched and cached. however, is there a way to tell the number of records that are in view?

thanks
\

scottmartin
10 Jul 2012, 8:32 AM
Are you referring to the store.pageSize? .. number of records in page before buffering, or records visible?

Scott.

xun
10 Jul 2012, 8:46 AM
Not sure if we mean the same thing.

Just want to find out the starting records and end records in sight. For example, using the grid turner example, when first loaded, a bottom info bar should say:

Display 1 to 35 of 50000 records

And it should update as we scroll.

Thanks

xun
10 Jul 2012, 12:12 PM
Found it.

PagingScroller has methods called
me.getLastVisibleRowIndex()
me.getFirstVisibleRowIndex()

scottmartin
10 Jul 2012, 12:28 PM
Ah .. nice.. thanks for the update!

Scott.