
Hi...
I have a datagrid which contains a Spark dropdownlist that needs to obtain dynamic data.
The datagrid uses a separate dataProvider.
please give me an example so i can clearly understand....
Thanks

Ans:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
[Bindable]
private var myDP:ArrayCollection = new ArrayCollection([
{Name:"Bikrant", City:"Delhi"},
{Name:"Brijesh", City:"Bombay"},
{Name:"Ravi", City:"Kanpur"},
{Name:"Avanish", City:"Chennai"}
]);
]]>
</fx:Script>
<s:Panel title="MX inline item renderers and item editors Example"
width="316" height="260"
chromeColor="#555555" color="#CCCCCC" backgroundColor="#000000">
<mx:DataGrid id="myDG" dataProvider="{myDP}"
variableRowHeight="true"
editable="true" x="52" y="31"
chromeColor="#C2A5A5"
color="#000000">
<mx:columns>
<mx:DataGridColumn dataField="Name" headerText="Name"/>
<mx:DataGridColumn dataField="City"
editorDataField="selectedItem"
headerText="City">
<mx:itemEditor>
<fx:Component>
<mx:ComboBox >
<mx:dataProvider>
<fx:String>Delhi</fx:String>
<fx:String>Bombay</fx:String>
<fx:String>Kanpur</fx:String>
<fx:String>Chennai</fx:String>
<fx:String>Lucknow</fx:String>
</mx:dataProvider>
</mx:ComboBox>
</fx:Component>
</mx:itemEditor>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
</s:Panel>
</s:Application>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.