Use a labelFunction().

 

Post back if you have difficulty.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Nabeel Kamboh (nkamboh)
Sent: Thursday, February 08, 2007 1:57 AM
To: [email protected]
Subject: [flexcoders] Question regarding complex data objects in data
grid

 

Hello all

 

I have an Action Script object that has complex data types, here is the
sample:

package action_script_src
{
 [Managed]
 [RemoteClass (alias="cp.engine.datamodel.CounterPointUser")]
 public class CounterPointUser extends CounterPointObject
 {
   public function CounterPointUser()
   {}

   public var permissions:String ; //Should be one of
internal/local/domestic/international 
   public var block_900_976:Boolean ; // 
   public var pstnNumber:ExtensionNumber;
   public var callFwd:CallForward ;
   public var intercom:IntercomExtension ;
   public var phone:Phone ;
   public var regularExtn:RegularExtension ;
 }
}

When I call RemoteService and return a collection of these objects, how
can I reference the date from the subobjects?

Here is a sample of what I want to get:

 

<mx:DataService id="ds" destination="user"/>
<mx:ArrayCollection id="users"/> 

The array collection contains the list of CounterPointUser objects
returned from the data service,
now in my mxml file, I want to access the Phone and ExtensionNumber
members of CounterPointUser
as follows:

<mx:DataGrid id="userList" dataProvider="{users}" editable="true"
width="100%" height="667">
<mx:columns>
<mx:DataGridColumn dataField="phone.macAddr" headerText="Mac Address"/>
<mx:DataGridColumn dataField="phone.model" headerText="Phone Type"/>
<mx:DataGridColumn dataField="{true}" headerText="Dual Line"/>
<mx:DataGridColumn dataField="pstnNumber.number" headerText="Ext."/>
<mx:DataGridColumn dataField="phone.lastName" headerText="Last Name"/>
<mx:DataGridColumn dataField="phone.firstName" headerText="First Name"/>
<mx:DataGridColumn dataField="phone.userId" headerText="UserID"/>
<mx:DataGridColumn dataField="phone.passwd" headerText="Password"/>
</mx:columns>
</mx:DataGrid>

What is the correct usage to traverse down complex data types?


------------------
Nabeel Kamboh
Cisco Systems
ABU 
<mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED](408> 
(408) 853-8668


 

 

Reply via email to