If the data provider is set up as [Bindable] it will refresh whenever
the underlying data changes:

[Bindable]
var someColleciont:ICollection; // could be ArrayCollection among others

<mx:DataGrid dataProvider="{someCollection}" />


If you are pulling data from some source using RemoteObject,
HTTPService, or WebService you can set up a timer to repeatedly call
the data:

import flash.utils.Timer;
import flash.events.TimerEvent;

var myTimer:Timer = new Timer (120000, 0); //
2min*60sec/min*1000ms/sec = 120000ms, 0 = repeat forever
myTimer.addEventListener(TimerEvent.TIMER, refreshData);

private function refreshData( event:TimerEvent ):void{
    myRemoteObject.getNewDataNow(); // on result update your data grid
}


Once you are feeling really adventurous you can use FDS (LCDS?) or
BlazeDS and push the data from the server to your app.

have fun, and welcome aboard


On Wed, May 14, 2008 at 11:33 PM, Tung Lee <[EMAIL PROTECTED]> wrote:
> New to the group and Flex.
>
> Try to figure out a way to auto refresh my datagrid...
> The app I am developping require the datagrid be refresh on a set time
> interval (say every 2 mins).
>
> Thanks in advance for any help
>
> Tung Lee
> -------------------------------------------------------------
> To unsubscribe from this list, simply email the list with unsubscribe in the
> subject line
>
> For more info, see http://www.affug.com
> Archive @ http://www.mail-archive.com/discussion%40affug.com/
> List hosted by FusionLink
> -------------------------------------------------------------



-- 
Darin Kohles
RIA Application Developer


-------------------------------------------------------------
To unsubscribe from this list, simply email the list with unsubscribe in the 
subject line

For more info, see http://www.affug.com
Archive @ http://www.mail-archive.com/discussion%40affug.com/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------


Reply via email to