2 Replies Latest reply on Sep 2, 2008 3:44 PM by Newsgroup_User

    Complex data display

    jackyQu
      I have a Collection of User Object:
      User {name:'tom',age:14,{departname:'localDept',rade:40}}
      to display departname : localDept in Column departName
      how to do this ,i 'm don't find examples in livedoc!
      someone tell me
      thanks
        • 1. Re: Complex data display
          batmitra Level 1
          hi
          what you want to do is very easy you just need to set your datagrid dataprovider as your object, althought you should put your object inside an array or arraylist.
          you are not getting anything because you are missing the dataprovider
          • 2. Re: Complex data display
            Level 7

            "reqasker" <webforumsuser@macromedia.com> wrote in message
            news:g9g8c0$m74$1@forums.macromedia.com...
            >I have a Collection of User Object:
            > User {name:'tom',age:14,{departname:'localDept',rade:40}}
            > to display departname : localDept in Column departName
            > how to do this ,i 'm don't find examples in livedoc!
            > someone tell me
            > thanks
            >
            >
            > <mx:DataGrid x="0" y="20" width="552" height="190" id="usertb">
            > <mx:columns>
            > <mx:DataGridColumn headerText="loginName" dataField="name" />
            > <mx:DataGridColumn headerText="LocalName" dataField="localName"/>
            > <mx:DataGridColumn headerText="password" dataField="password"/>
            > <mx:DataGridColumn headerText="departmentName" dataField="department">
            >
            > </mx:DataGridColumn>
            >
            > </mx:columns>
            > </mx:DataGrid>

            You'll need to use labelFunctions to get at the nested objects.