I have had this problem before I now use this Combobox by Ben Forta:
http://www.forta.com/blog/index.cfm/2006/11/22/Flex-ComboBox-With-selectedVa lue-Support Perhaps take a look. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Wednesday, 24 September 2008 11:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Combobox does not hold selected item Here is latest code. Still does not work: public function handleDataChanged(event:ListEvent):void { var colName:String = DataGrid (listData.owner).columns[listData.columnIndex].dataField; data[colName] = selectedItem; DataGrid (listData.owner).dataProvider.itemUpdated(DataGrid (listData.owner).selectedItem); } Can you help? --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "markgoldin_2000" <[EMAIL PROTECTED]> wrote: > > Not sure what you mean. > Here is my combobox's dataChange handle: > public function handleDataChanged > (event:ListEvent):void > { > var colName:String = DataGrid > (listData.owner).columns[listData.columnIndex].dataField; > data[colName] = selectedItem; > mainApp.globalYardData.appendChild(DataGrid > (listData.owner).selectedItem); > } > What collection are you talking about? > DataGrid's dataProvider? > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , Alex Harui <aharui@> wrote: > > > > Usually because you need to call itemUpdated on the collection > > > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On Behalf Of markgoldin_2000 > > Sent: Tuesday, September 16, 2008 1:12 PM > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > > Subject: [flexcoders] Combobox does not hold selected item > > > > > > I have a combobox in dataGrid as a custom renderer. When I select an > > item in the combo the datagrid's data property has correct value, > but > > combo still shows its initial value. Any idea why? > > > > Thanks > > >
<<image001.jpg>>
<<image002.jpg>>