tags:

views:

14

answers:

2

I have datagrid. the source for this datagrid is a url that returns n number of rows in json format.

i want to save this result in an array and show 20 records in the grid at a time. and cycle to the next 20 records in a time interval.

How to do this? pls help.

Somethings i tried

created a httpservice and mapped it to a datagrid

-Vivek

A: 

Hello.

When you say 'how to do this', what are you refering to? The refresh data part? How to set an interval? How to parse JSON to Array?

In anycase, make the dataProvider for the DataGrid an ArrayCollection and make sure it's [Bindable]. This will enable data changes to be reflected immediatly in the DataGrid.

Francisc
hi thanks for the answer.. i dont want to get all records in the first load and show 20 records in a interval of 20 seconds.
Vivek Chandraprakash
I'm sorry, I still don't understand.
Francisc
If you are worried about Flash performance, don't be, get all data and use virtualization. Thus you minimize server calls and optimize performance only loading what can be seen at once.
Francisc
thanks francisc.. i stored all data in arraycollection and made that as data provider using a filter and it worked well...
Vivek Chandraprakash
A: 

Matt Chotin's articles on paging are still the best. http://blogs.adobe.com/mchotin/2004/03/large_data_sets.html http://blogs.adobe.com/mchotin/2004/04/large_data_sets_1.html http://blogs.adobe.com/mchotin/2004/05/large_data_sets_2.html

Gregor Kiddie
Hi Gregor, Thanks for the response...
Vivek Chandraprakash