1 Reply Latest reply on May 15, 2007 12:35 PM by eighty1

    accessing nested child in model to populate datafield in datagrid.

    Romain_Eude
      I am using Rails + Flex and I have problems to access nested xml in a datagrid.datafield.
      I reproduce this in a simple mxml sample:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" width="954">
      <mx:Model id="md">
      <root>
      <e1>el1</e1>
      <e2>el2</e2>
      <child>
      <c1>c1</c1>
      <c2>c2</c2>
      </child>
      <e3>el3</e3>
      </root>
      </mx:Model>
      <mx:DataGrid id="myGrid"
      dataProvider="{md}" >
      <mx:columns>
      <mx:DataGridColumn dataField="e1"/>
      <mx:DataGridColumn dataField="e2"/>
      <mx:DataGridColumn dataField="child"/>
      <mx:DataGridColumn dataField="child.c1"/>
      <mx:DataGridColumn dataField="e3"/>
      </mx:columns>
      </mx:DataGrid>
      </mx:Application>



      Basically, at runtime the content of 3rd column is object (alright) and the 4th column is empty whereas it should be "c1".

      Am I doing something obviously wrong ?

      Thanks for any help.

      Romain.