Flex AdvancedDataGrid的使用,谁能告诉我呀?
注:第一列是带Checkbox的Tree。
还有问题请教各位:
labelField是元素对象的属性是显示不了(carInfo.car_name),好像只可显示同级的属性怎么解决?希望各位能帮助我,Thanks!
<mx:AdvancedDataGrid id="adg" width="100%" height="100%" dataProvider="{instance.cars}"
variableRowHeight="true" wordWrap="true" verticalGridLineColor="0x339900" headerColors="[0x339900,0xFFEBCD]" horizontalGridLineColor="0x8B4513">
<mx:columns>
<mx:AdvancedDataGridColumn headerText="vehicle name" dataField="carInfo.car_name"/>
<mx:AdvancedDataGridColumn headerText="terminal key" dataField="carInfo.terminal_key" />
<mx:AdvancedDataGridColumn headerText="sim code" dataField="carInfo.sim_code"/>
</mx:columns>
</mx:AdvancedDataGrid>
/*****vo.Car****/
[Bindable]
public class Car
{
private var _term:BaseTerminal;
private var _imageName:String;
private var _icon:Icon;
private var _carInfo:CarInfo;
...............
}
[Bindable]
[RemoteClass(alias="vo.Car")]
public class CarInfo
{
public var car_name:String;
public var car_id:String;
public var group_name:String;
public var speed:int;
public var terminal_key:String;
public var sim_code:String;
public var fuel_min:int;
public var fuel_max:int;
public var fuel_size:int;
...........
}
相关文档:
<?
xml
version
=
"1.0"
?>
<!-- Simple example to demonstrate the Alert control. -->
<
mx:Application
xmlns:mx
=
"http://www.adobe.com/2006/mxml"
>
&n ......
转载于:http://hi.baidu.com/wei83523408/blog/item/69a1f4ed0e8102ddb21cb176.html
一、
准备工作:
所需要的软件
Eclipse 3.3 + FlexBuilder3 beta2
插件版
+MyEclipse 6.0 +Lcds + Tomcat
5
二、
安装过程:
1.
安装
MyEclipse6.0(
在此不再详述
)
。
2. ......
(注:采用fb4 beta1开发,由于兼容问题,可以适当加以修改放到自己的环境中,测试的时候需要放到服务器上面,本人的测试url为
http://127.0.0.1/astest/asjs.html?msnum=13112345678)
mxml文件:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" creation ......
1.监听事件时用弱引用方式(特别是对Applicatiion.applicaion和Stage的事件监听),方式如下:第五个参数值为true
Application.application.addEventListener(MouseEvent.CLICK,doClick,false,0,true);
2.集合类如Array和Dictionary里的元素,在不用的时候要设置为null;(尤其是主页面上的集合类),如:myMap[o]=null;
3. ......