On 8/8/06, Shannon Hicks <[EMAIL PROTECTED]> wrote:
It's hard when you haven't done it before :)Here's what your code should basically look like:for (var i:number=0;i<myComboBox.dataProvider.length ;i++) {if (userObject.companyID == myComboBox.dataProvider.getItemAt(i).data) {myComboBox.selectedIndex = i;break;}}Shan
From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Marlon Moyer
Sent: Tuesday, August 08, 2006 7:09 PM
To: [EMAIL PROTECTED]ups.com
Subject: [flexcoders] Fwd: Pre selecting a combo box
I've got a master detail form that works so far except for a combo box that's giving me fits. The combo box is populated from an xml file that contains a company id and company name relabeled with the "label" and "data" headers. The combo box populates correctly and I've verified that it returns the correct company id. Now, for existing users, I want the combo box to automatically go to the correct company they're assigned to. The user object has a company id. I don't believe that I can do it with binding since it's expecting a selectedIndex vs a selected data value. I've been experimenting around with trying to loop through the objects in the combobox, but I haven't had any luck doing so yet.
Is it really this hard?
--Marlon
--
Marlon--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date: 8/7/2006
--
Marlon
__._,_.___
--
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
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
Reply via email to

