首页 > 其他 > 详细

Flex DataGrid 添加控件

时间:2014-12-25 16:12:23      阅读:340      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!