mx:DataGrid与s:DataGrid的写法

Flex4.5中,mx:DataGrid与s:DataGrid的写法是不一样的

<?xml version="1.0" encoding="utf-8"?>
<s:Application ... >
    
    <fx:Declarations>
        <!-- 将非可视元素(例如服务、值对象)放在此处 -->
        <s:ArrayList id="shiZhengData">
            <fx:Object name="唐曾" phone="13800138000" zhizefawei="西至大黑天,东至盘古" zhineng="打家劫舍" />
            ...
        </s:ArrayList>
    </fx:Declarations>
    
    <!-- mx:DataGrid -->
    <mx:DataGrid id="ShiZhengDG" dataProvider="{shiZhengData}">
        <mx:columns>
            <mx:DataGridColumn dataField="name" headerText="姓名" width="80" />
            <mx:DataGridColumn dataField="phone" headerText="电话" width="120" />                        
            <mx:DataGridColumn dataField="zhineng" headerText="职能" />
            <mx:DataGridColumn dataField="zhizefawei" headerText="职责范围" />
        </mx:columns>
    </mx:DataGrid>
  
    <!-- s:DataGrid -->
    <s:DataGrid id="spark_ShiZhengDG" dataProvider="{shiZhengData}">
        <s:columns>
            <s:ArrayList>
                <s:GridColumn dataField="name" headerText="姓名" width="80"  />
                <s:GridColumn dataField="phone" headerText="电话" width="120" />                        
                <s:GridColumn dataField="zhineng" headerText="职能" />
                <s:GridColumn dataField="zhizefawei" headerText="职责范围" />
            </s:ArrayList>
        </s:columns>
    </s:DataGrid>
    
</s:Application>

运行结果分别如下:

mx:DataGrid

s:DataGrid

 

注:上一篇关于mx:DataGrid样式CSS的应用,对于s:DataGrid却没有什么效果.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值