i have following xml
<?xml version="1.0" encoding="UTF-8" ?>
<Users>
<User>
<ID>SMSUser(63)</ID>
<Email>[email protected]</Email>
</User>
<User>
<ID>SMSUser(64)</ID>
<Email>[email protected]</Email>
</User>
</Users>
Above is bind with a datagrid as below
<mx:Script>
<![CDATA[
import mx.rpc.events.FaultEvent;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
[Bindable]
private var xmlData:ArrayCollection;
private function resulthandler(e:ResultEvent):void
{
xmlData = e.result.Users.User;
}
private function faulthandler(e:FaultEvent):void
{
Alert.show("Error");
}
]]>
</mx:Script>
<mx:HTTPService id="listData" result="resulthandler(event)"
fault="faulthandler(event)" resultFormat="object"
showBusyCursor="true" method="GET">
</mx:HTTPService>
<mx:DataGrid id="dg" dataProvider="{xmlData}" >
<mx:columns>
<mx:DataGridColumn dataField="ID" headerText="ID" />
<mx:DataGridColumn dataField="Email" headerText="Email" />
</mx:columns>
</mx:DataGrid>
How can i show Email in textbox when user select any item in the grid?