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="addChargeToTable()"/>
<mx:DataGrid id="otherChargesTable" width="100%"
dataProvider="{chargeDataProvider}">
<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.