<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:supportClasses="com.esri.ags.skins.supportClasses.*" minWidth="955" minHeight="600" creationComplete="init()"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.events.FlexEvent; [Bindable] private var consprojects:ArrayCollection=new ArrayCollection ([{name:'西安',consOrgName:'普元',projectStatus:'运营',tbOrgName:'研一',projectManager:'张',projectCost:'3876M',buildingArea:'50'},{name:'绥德',consOrgName:'未来',projectStatus:'破产',tbOrgName:'研二',buildingArea:'60'},]); protected function init(event:FlexEvent = null):void { } public function clickEvent(o:Object):void{ //Alert.show(o.consOrgName); var javaeyeUrl:URLRequest = new URLRequest("MyMenu.html"); navigatetoURL(javaeyeUrl); } ]]> </fx:Script> <fx:Declarations> <!-- 将非可视元素(例如服务、值对象)放在此处 --> </fx:Declarations> <s:Group width="100%" height="100%"> <s:VGroup width="100%" height="100%"> <s:HGroup width="100%" height="30"> </s:HGroup> <mx:DataGrid width="100%" dataProvider="{consprojects}"> <mx:columns> <mx:DataGridColumn headerText="序号" sortable="false" resizable="false" textAlign="center" editable="false" width="40"/> <mx:DataGridColumn headerText="XXXX" datafield="name"> <mx:itemRenderer> <fx:Component> <mx:LinkButton label="{data.name}" color="red" textdecoration="none" click="outerDocument.clickEvent(data)"/> </fx:Component> </mx:itemRenderer> </mx:DataGridColumn> <mx:DataGridColumn headerText="XXXX" datafield="consOrgName"/> <mx:DataGridColumn headerText="XXXX" datafield="projectStatus"/> <mx:DataGridColumn headerText="XXXX" datafield="tbOrgName"/> <mx:DataGridColumn headerText="XXXX" datafield="projectManager"/> <mx:DataGridColumn headerText="XXXX" datafield="projectCost"/> <mx:DataGridColumn headerText="XXXX" datafield="buildingArea"/> </mx:columns> </mx:DataGrid> </s:VGroup> </s:Group> </s:Application>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。