CodeGirl wrote
> So I put an event dispatch at the getResults of the webservice call and
> then added an eventListener and when the event was fired telling me that
> the data was loaded, I then assigned the selectedIndex.  But again,
> nothing was selected.   Any Ideas?

Maybe the data is received successfully from your service but the
dataProvider of the ComboBox is not populated at the time you try to set the
selectedIndex.
You could try to populate the dataProvider 'manually' after receiving the
data from your service and set the selectedIndex afterwards. 

protected function myResultHandler(event:ResultEvent):void
{
    colorsCB.dataprovider = event.my.data.object;
    colorsCB.selectedIndex = colors.lookupNdxByID(defaultColor);
}

Olaf




--
View this message in context: 
http://apache-flex-users.2333346.n4.nabble.com/default-Index-for-ComboBox-or-DDL-when-DataProvider-data-comes-from-a-webservice-tp13321p13327.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Reply via email to