Hi Martina,

you could try to set the selectedIndex using callLater after the dataProvider has changed.

Cheers,
Ralf.

On 7/24/06, Martina Smith <[EMAIL PROTECTED]> wrote:
Hi,
 
I am using the ComboBox component (<mx:ConboBox>) in flex 2.0. I am attaching the dataprovider to the combobox by the bind property. The Dataprovider is actually an array. The items in the dataprovider get refreshed dynamically.
 
Here is how I populate the combobox items:
<mx:ComboBox id="contactListDropDown" selectedIndex="{TestModelLocator.getInstance ().selectedUserIndexAsNumber}" dataProvider="{TestModelLocator.getInstance().dataProviderArray}" change="contactListChangeHandler(event)"/> 
 
I want to maintain the old selectedIndex everytime I refresh the dataprovider.
 
The problem I am facing is that the 'selectedIndex' property is not getting refreshed even if I store the old value. The ' selectedIndex' resets to 0 once the dataprovider is refreshed.
 
I need to get this thing solved as my functionality depends on the current selected index of the combobox.
 
Thanks in Advance,
 
Martina
 
 
 


Find out what India is talking about on Yahoo! Answers India.




--
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany __._,_.___

--
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




__,_._,___

Reply via email to