I have DropDownList rendered on DataGrid. My Datagrid consist of two columns, first column consist Name of Item while second column consists DropDownList(with labels to assign to that item).
I'm able to load to fetch label values from database and load them to DropDownList.
so each row consists Item name and DropDownList with label data loaded into it.
Now what I want is, I want each drop down to show Label associated to that particular Item.
My Flex Code:
<mx:DataGrid id="IdDgItemLabelDisp" left="10" right="10" top="39" bottom="10" dataProvider="{arrAllItem}">
<mx:columns>
<mx:DataGridColumn dataField="itemName" headerText="Item Name"/>
<mx:DataGridColumn headerStyleName="dataGridHeadingStyle" headerText="Label">
<mx:itemRenderer>
<fx:Component>
<mx:HBox horizontalAlign="center">
<fx:Script>
<![CDATA[
]]>
</fx:Script>
<s:DropDownList id="IdCmbItemLabel" dataProvider="{outerDocument.arrLabelCombo}" selectedItem="{outerDocument.arrLabelCombo.getItemAt(0)}">
</s:DropDownList>
</mx:HBox>
</fx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>