0
我有以下XML檢索的FlexGrid項目
<?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>
以上是綁定一個DataGrid如下
<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>
我如何可以顯示文本的電子郵件時,用戶選擇任何項目網格?