look at using the initialize attribute of the Application tag. You set thisto a function and when the app loads, this function is fired.
BUT - in this case I would set the function on the grids creationComplete so that when the grid is created the function will fire and your data will load. -----Original Message----- From: dhiren9 [mailto:[EMAIL PROTECTED] Sent: Friday, February 25, 2005 3:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Populating DataGrid using Remote Object with arguments Hi, I've gone through examples where I can call a remote object by clicking on a button and populating a datagrid. The function call on the button click accepts arguments processed by the remote object (POJO). How do i populate the datagrid on page launch, without having to click a 'Get Data' button AND pass arguments to the Java object? In other words, I dont want to click a button to pass an argument and populate the grid. Doing it like this does not work: <mx:DataGrid id="dg3" dataProvider="remoteTagInfo.getList ('ENG').result" width="100%"> </mx:DataGrid> Code below... Thx. <mx:Script> var my_list; </mx:Script> <mx:RemoteObject id="remoteTagInfo" source="samples.explorer.EmployeeManager" result="my_list=event.result" fault="alert(event.fault.faultstring, 'Error')"> <mx:method name="getList"/> </mx:RemoteObject> <mx:Model id="dp" source="catalog.xml" /> <mx:Panel id="menuBarPanel" title="test" width="100%" height="100%"> <mx:Button label="Get Data" click="remoteTagInfo.getList('ENG')"/> <mx:DataGrid id="dg3" dataProvider="{my_list}" width="100%"> </mx:DataGrid> </mx:Panel> Yahoo! Groups Links