I gave that a try and it always give's me a value of "-1" (binding to text field to debug). Do i need to specify what field in the datasource that it should be looking at?
Chris --- In flexcoders@yahoogroups.com, "Matt Chotin" <[EMAIL PROTECTED]> wrote: > > Don't you want to be looking into the dataProvider of grouplist, not > grouplist itself? And then basically you would do something like > > grouplist.selectedIndex = > IList(groulist.dataProvider).getItemIndex([EMAIL PROTECTED] > id); > > Matt > > -----Original Message----- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of christopherjdunn > Sent: Thursday, April 06, 2006 11:23 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] ComboBox qquestion > > I have a combobox whose datasourse is a CF CFC. This is working just > fine. What i'm trying to do is select a particular item in the > combobox based upon a node that is select in a Tree. The following > code is what i use in a CF flash form, which works fine (Flex 1.5). > Looking at the docs, i can not find any replacement code for the > "getItemIndex". Any help would be great. > > public function changeCollection() { > for (var i:Number = 0; i < grouplist.rowCount; i++) { > if (grouplist.getItemIndex(i) == > [EMAIL PROTECTED]) { > grouplist.selectedIndex = i; > break; > } > } > } > > Chris > > > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/