I've created two custom objects, for example:
Sandwich object - contains name of sandwich as a string, and an array of Toppings objects.
Toppings object - contains 2 strings, the name of the topping and the amount of topping used. They have to stay together.
In my main MXML file, I want to populate 2 controls - a label above a datagrid, and the datagrid itself.
The label gets the sandwich name string from the sandwich object and displays the name, no problem.
I try to wrap the toppings array in an arraycollection and use it as the dataprovider for the grid - with the idea that the two columns of the grid will list a) the topping name, and b) the amount of topping used.
However, the problem is that since I'm returning an array of Toppings objects - Flex doesn't really have any idea what those are at this level (just that they are Toppings objects, not specifically a Toppings object with ketchup and 3oz as elements I can access). I have getters and setters in the Toppings object - but I can't seem to drill down to those. So the grid remains empty.
How can I ultimately bring through the two elements of the Toppings objects - each their own column in the datagrid (while remaining linked together)? Or should I be using another control completely for this task?
Since you issue seems a bit fuzzy on your structures and logic, I figured the best way might be to point you to my blog.
I just started a series on Data Grids and Advanced Data Grids (Parts 1 and 2 are available) with some code and explanations that might help.
Without seeing your code it's difficult to understand the dilema and probably more difficult on you to try to explain it effectively (I can understand that one).
Check this out and see if it helps, if not send us some of your code so we can see the issue you are having.