What do you want to do with customer_id?  Normally you wouldn't show it
in the combobox and just see the names.  If you want to see both, use a
custom labelFunction.

 

Normally, someone sees the names and picks one and
selectedItem.customer_id is the customer id.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of George Georgiou
Sent: Sunday, October 14, 2007 2:03 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] ComboBox populate list with remoteobject

 

Hi there,

 

I got a remoteobject which loads data from an sql table. I got something
like 5 fields for customers.

 

I want to populate a combobox showing the name of the customer and
having as  a value the customer_id. 

 

After Googling it a bit, I have ended up with this:

 

<mx:ComboBox id="customer_name" dataProvider="{customerData}"
labelField="customer_name"/>

 

this works great! But what about the dataField? (at my suprise I have
found out that although a labelField does exist - which is cool, a
dataField attribute does not exist).


How can I bind the customer_id into my combobox? Any ideas?

 

thanks,
George

 

 

Reply via email to