Chinaunix首页 | 论坛 | 博客
  • 博客访问: 146845
  • 博文数量: 24
  • 博客积分: 3000
  • 博客等级: 中校
  • 技术积分: 320
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-21 10:48
文章分类

全部博文(24)

文章存档

2008年(24)

我的朋友
最近访客

分类: 系统运维

2008-03-13 10:21:11

<?xml version="1.0"?>
<!-- dpcontrols/DataGridEvents.mxml -->
<mx:Application xmlns:mx="" layout="absolute" width="500" height="400">
   <mx:Script>
   <![CDATA[
      import mx.events.ListEvent;
      private function itemClickEvent(event:ListEvent):void {
         clickColumn.text=String(event.columnIndex);
         clickRow.text=String(event.rowIndex);
         eventType.text=event.type;
      }
   ]]>
   </mx:Script>
   <mx:DataGrid id="myGrid" width="350" height="150"
         itemClick="itemClickEvent(event);" x="0" y="0">
        
      <mx:ArrayCollection>
         <mx:Object Artist="Pavement" Price="11.99"
            Album="Slanted and Enchanted" />
         <mx:Object Artist="Pavement" Album="Brighten the Corners"
            Price="11.99" />
      </mx:ArrayCollection>
   </mx:DataGrid>
   <mx:Label text="ColumnIndex:" x="0" y="158"/>
   <mx:TextInput id="clickColumn" x="94" y="156" width="84"/>
   <mx:Label text="RowIndex:" x="0" y="184"/>
   <mx:TextInput id="clickRow" x="94" y="182" width="84"/>
   <mx:Label text="EventType::" x="0" y="210"/>
   <mx:TextInput id="eventType" x="94" y="208" width="84"/>
</mx:Application>

 

阅读(918) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~