Sorry Joe,
Forgot to mention that you have to reference the public
ArrayCollection's location.
dataProvider="{parentDocument.myArrayCollection}"
or, for Cairngorm:
dataProvider="{ModelLocator.getInstance().myArrayCollection}"
-TH
--- In [email protected], "Tim Hoff" <[EMAIL PROTECTED]> wrote:
>
> Hi Joe,
>
> Instead of pushing the data to the DataGrid, have the DataGrid
pull
> the data from the public ArrayCollection with binding. Note the
curly
> binding braces.
>
> <mx:DataGrid id="dg" dataProvider="{myArrayCollection}"/>
>
> When the data in the ArrayCollection changes, the DataGrid will
> reflect the change automatically. Using this method avoids
creating a
> dependancy on the custom component by the application.
>
> -TH
>
> --- In [email protected], "Joe Stramel" <j.stramel@>
wrote:
> >
> > I have a custom component that I created and I have added it to
the
> main application. There is a datagrid inside the custom
component. I
> call the data in the main app, place it in a public
ArrayCollection
> and want the datagrid to display the data. My problem is that the
> datagrid is in a different viewstate other than the default view
and
> so I get a null reference error when I try to populate the
datagrid
> from the main app. Is there a way to force the component to
create
> itself with the main app even though it is in a different
viewstate?
> Thank you
> >
>
------------------------ 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/