高分向高手请教flex grid控件的使用(越详细越好!)

来源:百度知道 编辑:UC知道 时间:2024/07/15 21:20:37
比如,我在一个对话框中放入一个flex grid控件后,如和对其行数,列数,表格里边的内容进行操作,单击其中一行后,如何把里边的内容显示在编辑框中?

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="12" creationComplete="initApp()">
<mx:Script>
<![CDATA[
import mx.events.DragEvent;
import mx.events.DataGridEvent;
internal function initApp():void{
dg.addEventListener(MouseEvent.CLICK,AddHandler);
}
internal function AddHandler(event:Event):void{
tip_txt.text = "你选择:"+dg.selectedItem.name+" and "+dg.selectedItem.author+" and "+dg.selectedItem.date;
}
]]>
</mx:Script>
<mx:Model id="books">
<datas>
<book>
<name>1</name>
<author>A</author>