If I understand correctly, you have a ComboBox with a dataProvider, and want to set the selectedIndex / selectedItem of that dataProvider knowing only piece of data (the CountryCode). Is that correct?

Unfortunately, your approach is the way to do it using the built in Flex ComboBox. Our Flextras AutoCompleteComboBox implemented a selectedValue property, which allows you to do just that, though

http://www.flextras.com/?event=ProductHome&productID=10

Does this answer the question?

gan_sun2006 wrote:
Hi,

I am using combobox for which the bound data is coming from an arraycollection. My arraycollection has two properties called countryname(labelField) and countrycode. When i submit my page, the countrycode from my combo is saved to the DB. During retrieval I am given only countrycode and not countryname.

How can I show the equivalent countryname as selectedItem in my combobox? Presently I am looping through the arraycollection and showing the equivalent countyname. Is there any other way to do it?

Any help is highly appreciated...

Regards,
Ganesh Sundar R.



--
Jeffry Houser, Technical Entrepreneur
Adobe Community Expert: http://tinyurl.com/684b5h
http://www.twitter.com/reboog711  | Phone: 203-379-0773
--
Easy to use Interface Components for Flex Developers
http://www.flextras.com?c=104
--
http://www.theflexshow.com
http://www.jeffryhouser.com
--
Part of the DotComIt Brain Trust

Reply via email to