PDA

View Full Version : Paged Grid question



gizzmo
27 May 2007, 11:31 PM
Hi all,

Is it possible to create a paged grid where you download all the data once?
I don't want to download chunks of data. I just want the page feature with say 100 records a page.

Johan

Animal
27 May 2007, 11:45 PM
So a non paged, paged grid is what you want?

Someone else asked for this strange thing. Do a search for "PagedMemoryProxy", I think someone wrote one.

jsakalos
28 May 2007, 2:40 AM
Hi all,

Is it possible to create a paged grid where you download all the data once?
I don't want to download chunks of data. I just want the page feature with say 100 records a page.

Johan

Hi Johan,

I don't know how many records do you want to load but with several hundred or more you'll hit a performance issue for sure. That is why the paging grid has been invented.

Hi,

trbs
28 May 2007, 4:01 PM
So a non paged, paged grid is what you want?

Someone else asked for this strange thing. Do a search for "PagedMemoryProxy", I think someone wrote one.

Yeah that was this thead: Paging of JavaScript Array Thead (http://extjs.com/forum/showthread.php?t=3793&page=2&highlight=pagingmemoryproxy)

However i did find one good reason for it myself :) Look at the localization example in Ext-1.0.1/examples/locale; I wanted to demonstrate localized month names and translations in the grid. Since all the month are already in the translation file the PagingMemoryProxy allowed me to also show paging localization as well without server side magic :)

Johan, if u want to do this and use your own custom ajax call; you can load your data into an array or javascript object and adept PagingMemoryProxy.

But if you want to use Store proxy, and not a custom ajax call, then you'll have to extend HttpProxy to LoadOnceHttpProxy and the Json/XmlReader.

It must cache the result with a custom loadResponse and override load to not query the server when a result is already in cache. Then let the proxy send the request parameters to your new Json/XmlReader and handle paging/filtering/sorting there.