I have a datagrid like below:
<mx:DataGrid>
<columns>
<mx:DataGridColumn dataField=¡±name¡±/>
<mx:DataGridColumn dataField=¡±type¡±>
<itemRenderer>
<component>
<mx:ComboBox>
<dataProvider>
<Object
label=¡±A¡± value=¡±1¡±/>
<Object label=¡±B¡± value=¡±2¡±/>
<Object label=¡±C¡± value=¡±3¡±/>
<dataProvider>
<mx:ComboBox>
</component>
<itemRenderer>
</mx:DataGridColumn>
</columns>
</mx:DataGrid>
and have 2 data source to fill the grid
1. name: X type: 1
name: Y type: 2
name: Z type: 3
2. name: X1 type: 2
name:Y1 type: 1
name: Z1 type: 3
Now, how can I set the combobox¡¯s selected value through data source
¡®type¡¯ field? I have tried it that uses a function to set selected
value when data bind. But once I change the grid dataprovider( eg: web
service return different data) or I sort the data by click the grid
title, the combobox¡¯s selected value will change itself, but be not
¡®type¡¯ field value. It seems that the new selected value is the last
data source¡¯s value.
Is this a bug? Or do I mask a mistake?