You’ll need to use a labelFunction.
<mx:DataGridColumn headerText=”Nationality”
labelFunction=”getNationalityDescription” />
<mx:Script>
Function getNationalityDescription(item)
{
Return item.idNationality.description;
}
</>
Matt
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Luis Felipe Avalos Pérez
Sent: Monday, December 05, 2005
2:08 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] acceding complex
data java pojo charged in a dataGrid Control
I have and array of javabeans
cargued in a result of a RemoteObject Call:
employee, some properties have a reference to
another object like this:
public class Employee
implements Serializable
{
private Long idEmployee;
private Nationality
idNationality;
private String name;
private String;
getters... and setters methods
}
and...
public class Nationality
implements Serializable
{
private Long idNationality;
private String description;
getters... and setters methods.
}
this Array of objects was charged in a
Dataprovider of a dataGrid
so, i want to read a data of a propertie
idNationality object a
dataGirdColumn.
how can i acced to this object ??
example:
<mx:DataGrid id="dgEmployee" dataProvider="{employees}"
>
<mx:columns>
<mx:Array>
<mx:DataGridColumn headerText="Name"
columnName="name" />
<mx:DataGridColumn headerText="Nationality"
columnName="idNationality.description" />
</mx:Array>
</mx:columns>
</mx:DataGrid>
where:
employees= is an
array of objects "employee"
idNationality.description= "i can't see this propertie"
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|