1 person found this helpful
If this post answers your question or helps, please mark it as such.
To add a row to the DataGrid you really need to just add data to the dataProvider collection object.
You can access components by going through the main app:
mx.core.Application.application.myA.myVar = myC.cVar;
But you should really be using custom events to communicate between components, though it is more complex. Here is my Flex 3 Cookbook post of the topic of custom events:
Here are some sample apps on custom events on my web site (right click to View Source):
Here is my tutorial on custom events:
Thank you for your help.
I will do MVC since I have some namy components to share the data.
For now, I want it works with the mx.core.Application.application.
But, I cannot trace datagrid in a.mxml. It shows in the c.mxml, but it cannot addItem into the datagrid.
for example: I try to do
a.ArrayName.addItem(tempItem) it gave me error : undefined property.
this.parent.parent).allgrouptypes.addItem(tempItem); it gave me runtime error TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Stage@3707b21 to views.Maintenance.
I trace this.parent.parent -- [object Stage]
I trace this.owner -- object _eventually_mx_managers_SystemManager