码迷,mamicode.com
首页 > 其他好文 > 详细

Flex DataGrid 添加控件

时间:2014-12-25 16:14:16      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:

哈喽,又和大家见面了。今天要写的东西是关于Flex DataGrid添加“编辑”或“删除”按钮。

下面是部分代码:

 <mx:DataGrid id="dgShow" x="25" bottom="20" width="750" height="490" chromeColor="#A8C6EE" fontWeight="bold"
     textAlign="center" variableRowHeight="true" verticalScrollPolicy="auto">
  <mx:columns>
   <mx:DataGridColumn width="100" dataField="FCID" headerText="功能ID" resizable="false"
          sortable="false"/>
   <mx:DataGridColumn width="150" dataField="FCName" headerText="功能名称" resizable="false"
          sortable="false"/>
   <mx:DataGridColumn width="150" dataField="FCTarget" headerText="功能对应实例" resizable="false"
          sortable="false"/>
   <mx:DataGridColumn width="150" dataField="FCState" headerText="功能状态" resizable="false"
          sortable="false"/>
   <mx:DataGridColumn width="130" dataField="FCBZ" headerText="功能备注" resizable="false"
          sortable="false"/>
   <mx:DataGridColumn width="70" headerText="操 作" resizable="false" sortable="false">
    <mx:itemRenderer>
     <fx:Component>
      <mx:HBox>
     <fx:Script>
        <![CDATA[
         protected function button1_clickHandler(event:MouseEvent):void
         {
          //事件在这些
         }
        ]]>
       </fx:Script>
       
       <mx:Button width="100%" label="编 辑" click="button1_clickHandler(event)"/>      </mx:HBox>
     </fx:Component>
    </mx:itemRenderer>
   </mx:DataGridColumn>
  </mx:columns>
 </mx:DataGrid>

 

效果图如下:

技术分享

Flex DataGrid 添加控件

标签:

原文地址:http://www.cnblogs.com/wzy1990/p/4184753.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!