Hi,

Thanks for the quick answer.
I do not like the tree effect... I want a plain grid first (later I'll
use the tree but based on other things).

+--------+--------------+
| foo    | bar          |
+--------+--------------+
| 1      | test         |
+--------+--------------+

That's what I want... I have around 10 xml nested items and the user
will be able to display all columns if he/she wants to.
So my idea is a nicer solution than labelFunction (which I'd have to
make a switch for all fields).
That's my real structure: http://pastie.org/241033 (each <item> is the
row I want to display on grid).

Is it better explained now? There must have a nicer solution for this
instead of labelFunction.... =)


Thanks in advance,

On Fri, Jul 25, 2008 at 11:55 AM, Amy <[EMAIL PROTECTED]> wrote:
> --- 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
>
> 



-- 
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9166-6902
MSN: [EMAIL PROTECTED]
URL: http://blog.bisna.com
Rio de Janeiro - RJ/Brazil

Reply via email to