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 - 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.
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.