Array "push" does not emit the events necessary to update the display. Instead, wrap the array in an ArrayCollection and use the dataProvider API, like addItem().
Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Husain Kitabi Sent: Monday, December 04, 2006 4:49 AM To: [email protected] Subject: Re: [flexcoders] selected combobox item to datagrid issue chargeDataProvider is empty array until a combo item is selected. So essentially, it has same data structure. Please advise. Yiðit Boyar <[EMAIL PROTECTED]> wrote: i think dataproviders should have the same data-structures. chargeArray chargeDataProvider do these two have the same type of elements inside? (maybe having the "name" and "price" properties is enough ) ----- Original Message ---- From: Husain Kitabi <[EMAIL PROTECTED]> To: [email protected] Sent: Sunday, December 3, 2006 4:04:52 PM Subject: [flexcoders] selected combobox item to datagrid issue Hi I am having to select an object in combo, on change event of combo, selected item should be displayed in datagrid.. I have the following code private function addChargeToTable( ):void{ if(chargeCombo. selectedIndex !=0) chargeDataProvider. push(chargeCombo .selectedItem) ; } <mx:ComboBox id="chargeCombo" dataProvider= "{chargeArray} " labelField=" name" change="addChargeTo Table()"/> <mx:DataGrid id="otherChargesTab le" width="100%" dataProvider= "{chargeDataProv ider}"> <mx:columns> <mx:Array> <mx:DataGridColumn headerText=" Fees" dataField="name" /> <mx:DataGridColumn headerText=" Price" dataField="price" /> </mx:Array> </mx:columns> </mx:DataGrid> For some reason, combo.selectedItem isnt displaying in datagrid. Please help Thanks Husain ________________________________ Check out the all-new Yahoo! Mail beta <http://us.rd.yahoo.com/evt=43257/*http:/advision.webevents.yahoo.com/mailbeta> - Fire up a more powerful email and get things done faster. ________________________________ Need a quick answer? Get one in minutes from people who know. Ask your question on Yahoo! Answers <http://answers.yahoo.com/;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx> . ________________________________ Everyone is raving about the all-new Yahoo! Mail beta. <http://us.rd.yahoo.com/evt=45083/*http:/advision.webevents.yahoo.com/mailbeta>

