No, you shouldn't have to do anything like that. Normal behavior for a combo box is to display nothing until a user interacts with it, selectedItem is null and selectedindex is -1. If yours is doing something else then there is code doing it. Is it a stock ComboBox? It sounds like someone has overridden the internal text field.
Or ha, there is a prompt specified that is a code value. Tracy Spratt, Lariat Services, development services available _____ From: [email protected] [mailto:[email protected]] On Behalf Of Libby Sent: Tuesday, March 10, 2009 6:11 PM To: [email protected] Subject: [flexcoders] Re: comboBox in datagrid I wish...no, I'm using labelField in one and a labelFunction in another one, but these are not invoked until you actually click on the dropdown. Thus, when data is first retrieved into the dropdown, the darned thing is displaying the "data" field rather than the "label: field. Should I be firing off something to force the dropdown to update when the data comes in? --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com, "Tracy Spratt" <tspr...@...> wrote: > > You probably need to specify the labelField. > > > > Tracy Spratt, > > Lariat Services, development services available > > _____ > > From: flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com [mailto:flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com] On > Behalf Of Libby > Sent: Tuesday, March 10, 2009 4:24 PM > To: flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com > Subject: [flexcoders] Re: comboBox in datagrid > > > > no, I 'm saying my comboBox displays whats in its data part of its array > collection, not its label, when it receives a new batch of data. Your > checkbox appears to do the same thing. > > --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com, > "Anthony DeBonis" <anthony@> wrote: > > > > Are you talking about an example like this? > > You may be better off creating a reusable/testable component in separate > AS or MXML file. > > > > <mx:Component> > > <mx:CheckBox creationComplete="init()"> > > <mx:Script> > > <![CDATA[ > > > > private var _data:Object; private function init():void { > this.addEventListener(MouseEvent.CLICK, update); > > } override public function get data():Object { > > return _data; > > } > > > > [Bindable] > > override public function set data(o:Object):void { > > _data = o; > > if(_data.checked == "true") this.selected = true; > > else this.selected = false; > > } > > > > private function update(event:MouseEvent):void { > > if(this.selected) _data.checked = "true"; > > else _data.checked = "false"; > > } > > > > > > ]]> > > </mx:Script> > > </mx:CheckBox> > > </mx:Component> > > >

