You can also set the selectedIndex to -1. That will not select anything.
When I'm using data binding with the comboBox, and I'm using a value object,
I usually set the initial values for the comboBoxes in the constructor for
the value object class.
 
~randy


   _____  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dallas
Sent: Thursday, December 27, 2007 4:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: how to Avoid - Compbo box fills up the first item
when databinding is used



you can add the following attribute:

prompt="Please select..."

That will be the first option in your combo.

--- In HYPERLINK
"mailto:flexcoders%40yahoogroups.com"[EMAIL PROTECTED], "Alex
Harui" <[EMAIL PROTECTED]> wrote:
>
> What do you want to happen?
> 
> 
> 
> ____________-_________-_________-__
> 
> From: HYPERLINK
"mailto:flexcoders%40yahoogroups.com"[EMAIL PROTECTED]
[mailto:HYPERLINK
"mailto:flexcoders%40yahoogroups.com"[EMAIL PROTECTED] On
> Behalf Of srikanth_reddy_-007
> Sent: Wednesday, November 14, 2007 8:01 AM
> To: HYPERLINK
"mailto:flexcoders%40yahoogroups.com"[EMAIL PROTECTED]
> Subject: [flexcoders] how to Avoid - Compbo box fills up the first item
> when databinding is used
> 
> 
> 
> About Combobox filling up the first item by default when we databinding
> 
> I don't get what you mean to say ...
> 
> I have the code like this
> 
> <mx:ComboBox id="txtFamilyName"
> y="24" left="10" right="10" editable="true"
> focusIn="fetchAutoC-ompleteData(-event, 'Family')"
> dataProvider=-"{modelLocator.-searchModel.-family}"
> focusOut="foucusOut-Handler()-"/>
> 
> in fetchAutoCompleteDa-ta function i will connect to database and
> update modelLocator.-searchModel.-family variable which has a
> databinding to ComboBox dataprovider. then the combobox will get
> populated with the first item of modelLocator.-searchModel.-family array
> . How can i avoid this?
> 
> and secondly the combobox grows its size to the max item fetched in
> the array. how can i avoid that too.
> 
> Thanks,
> Srikanth
>



 


No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.516 / Virus Database: 269.17.9/1198 - Release Date: 12/26/2007
5:26 PM
 

Reply via email to