--- In [email protected], "Guilherme Blanco" 
<[EMAIL PROTECTED]> wrote:
>
> Hi all,
> 
> 
> I'm interested to display a column in ADG and the field is a nested 
property.
> 
> <item>
>   <id>1</id>
>   <foo>1</foo>
>   <Bar>
>     <id>2</id>
>     <name>test</name>
>   </Bar>
> </item>
> 
> 
> What do I want? I want baz to be displayed... I tried this:
> 
> <mx:AdvancedDataGridColumn headerText="Bar" dataField="Bar.name"/>
> 
> 
> But it only displays the first level items (foo in my example) on 
screen.
> Any ideas how to solve it (I cannot change the XML structure - it's
> automatically generated by ORM tool)?

Try this inside your ADG MXML:

<mx:dataProvider>
            <mx:HierarchicalData source="{yourXML}" 
                childrenField="Bar"/>
        </mx:dataProvider>

Then you can use "name" in your dataField.  Note that this will give 
you a hierarchical (tree-like) effect.

If that's not what you wanted, you can probably use a labelFunction.

HTH;

Amy

Reply via email to