<mx:AdvancedDataGrid id="adg1" borderStyle="none" designviewDataType="flat" sortExpertMode="true" sortableColumns="true" width="100%" height="95%"> <mx:dataProvider> <mx:HierarchicalData id="hd" source="{str.node}"/> </mx:dataProvider> <mx:groupedColumns> <mx:AdvancedDataGridColumnGroup headerText="节点统计" > <mx:AdvancedDataGridColumn id="xuhao" headerText="序号 " datafield="@id"> <mx:itemRenderer> <fx:Component> <mx:LinkButton label="{data.@id}" color="red" textdecoration="none" click="outerDocument.clickEvent(data)"/> </fx:Component> </mx:itemRenderer> </mx:AdvancedDataGridColumn> <mx:AdvancedDataGridColumn headerText="节点名称" datafield="@source" /> <mx:AdvancedDataGridColumn headerText="提供数据" datafield="@x"/> <mx:AdvancedDataGridColumn headerText="使用数据" datafield="@y"/> </mx:AdvancedDataGridColumnGroup> </mx:groupedColumns>
</mx:AdvancedDataGrid>
<pre name="code" class="html">以上例子str :xml=new XML();
<?xml version="1.0" encoding="GB2312"?> <root> <node id="1" source="assets/monitor/a3.png" message="qqq" x="100" y="300"/> <node id="2" source="assets/monitor/a1.png" message="qqq" x="177.1345131623847" y="391.92533317427734"/> <node id="3" source="assets/monitor/a1.png" message="qqq" x="218.17693036146497" y="320.83778132003164"/> <node id="4" source="assets/monitor/a1.png" message="qq" x="203.92304845413264" y="240.00000000000003"/> <node id="5" source="assets/monitor/a1.png" message="qqqq" x="141.04241719908026" y="187.23688550569102"/> <node id="6" source="assets/monitor/a1.png" message="qqq" x="58.95758280091976" y="187.236885505691"/> <node id="7" source="assets/monitor/a2.png" message="qqq" x="-3.923048454132612" y="239.99999999999994"/> <node id="8" source="assets/monitor/a2.png" message="qqqq" x="-18.17693036146497" y="320.8377813200316"/> <node id="9" source="assets/monitor/a2.png" message="qq" x="22.86548683761525" y="391.92533317427734"/> <line id="1" fromNode="1" toNode="1"/> <line id="2" fromNode="1" toNode="2"/> <line id="3" fromNode="1" toNode="3"/> <line id="4" fromNode="1" toNode="4"/> <line id="5" fromNode="1" toNode="5"/> <line id="6" fromNode="1" toNode="6"/> <line id="7" fromNode="1" toNode="7"/> <line id="8" fromNode="1" toNode="8"/> <line id="9" fromNode="4" toNode="5"/> </root>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。