I'm sorry Jean-Luc, I'm using Cairngorm terminology.  I'm not sure 
how you're application is set-up.  But, if you are using a result 
handler (onResult) for your RPC call, you change the state of the 
view (grid) there.  The onResult function won't execute until all of 
the data is returned to your program.  From there the population of 
the grid and it's itemRenderers is almost instantaneous.  If you 
want to show me a little of your code (RPC and grid mxml), I can 
show you what I mean.

Tim

--- In [email protected], "Jean-Luc ESSER" <[EMAIL PROTECTED]> wrote:
>
> Hi Tim,
> 
> Your solution seems great, but i don't understand it very well.
> What do you mean by "I'm casting the lastResult from the RPC call 
to the VO in the ModelLocator " ?
> 
> If you could detail your solution, that would be very helpfull !
> 
> Thank you !
> 
> Best,
> Jean-Luc.
> 
> 
>   ----- Original Message ----- 
>   From: Tim Hoff 
>   To: [email protected] 
>   Sent: Friday, June 09, 2006 9:32 PM
>   Subject: [flexcoders] Re: Event when Data is Loaded ?
> 
> 
>   Hi Jean-Luc,
> 
>   I'm handling a similar situation in the onResult function of the 
>   command that gets the data. In the function, I'm casting the 
>   lastResult from the RPC call to the VO in the ModelLocator and 
then 
>   changing the view's state to display the data grid. This way the 
>   grid isn't displayed until all of the data has been returned and 
>   populated through binding.
> 
>   -TH
> 
>   --- In [email protected], "Jean-Luc ESSER" <flex@> 
wrote:
>   >
>   > I'm not loading data via URLLoader. Maybe you got me wrong. 
Sorry 
>   if i wasn't clear.
>   > Whichever data is sent to my DataGrid's dataProvider, i want 
to 
>   handle an event after the datagrid has loaded all this data.
>   > In my specific case, my dataProvider is binded to a 
valueObject in 
>   the ModelLocator (cairngorm).
>   > On creationComplete, my DataGrid dispatches an event which 
calls a 
>   command to populate my ValueObject.
>   > I want my DataGrid to become visible once all data has been 
>   loaded, and once all its itemRenderers have been populated.
>   > 
>   > Best,
>   > JL
>   > 
>   > 
>   > ----- Original Message ----- 
>   > From: Jim Robson 
>   > To: [email protected] 
>   > Sent: Friday, June 09, 2006 1:32 PM
>   > Subject: RE: [SPAM] [flexcoders] Event when Data is Loaded ?
>   > 
>   > 
>   > 
>   > Jean-Luc,
>   > 
>   > 
>   > 
>   > How about if you initialize the DataGrid's visible property to 
>   false until the data is loaded, and write a handler for the 
complete 
>   event of the URLLoader class that sets the DataGrid's visible 
>   property to true when all the data is loaded? Would that work? 
Docs 
>   on the complete event:
>   > 
>   > 
>   > 
>   > 
>   
http://livedocs.macromedia.com/labs/1/flex/langref/flash/net/URLLoade
>   r.html#event:complete
>   > 
>   > 
>   > 
>   > Jim
>   > 
>   > 
>   > 
>   > 
>   > ----------------------------------------------------------
>   -----------
>   > 
>   > From: [email protected] 
>   [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Luc ESSER
>   > Sent: Friday, June 09, 2006 6:29 AM
>   > To: [email protected]
>   > Subject: [SPAM] [flexcoders] Event when Data is Loaded ?
>   > 
>   > 
>   > 
>   > Hi there,
>   > 
>   > 
>   > 
>   > I'm trying to show a component on stage only when its 
>   dataProvider has finished populating the component.
>   > 
>   > Let's take for exemple a datagrid with an itemRenderer. How 
>   would i set my datagrid property to visible only when all data 
from 
>   its dataProvider has been loaded and its itemRenderers have been 
>   layed out ?
>   > 
>   > None of the events avalaible are made for that. Render Event 
>   would be the closest, but it's not made for that.
>   > 
>   > 
>   > 
>   > Any ideas ?
>   > 
>   > 
>   > 
>   > Best,
>   > 
>   > Jean-Luc.
>   >
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Check out the new improvements in Yahoo! Groups email.
http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to