Flex DataGrid 伪合并单元格实现思路

页面导航:首页 > 网络编程 > Flex > Flex DataGrid 伪合并单元格实现思路

Flex DataGrid 伪合并单元格实现思路

来源:互联网 作者:脚本宝典 时间:2015-06-23 18:49 【

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 ? xml version = 1.0 encoding = utf-8 ? s:MXDataGridItemRenderer xmlns:fx = http://ns.adobe.com/mxml/2009 xmlns:s = library://ns.a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="utf-8"?>
<s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx"
         width="100%" height="100%"
          
         autoDrawBackground="false"
         creationComplete="mxitemrenderer1_creationCompleteHandler(event)"
        >
  <s:layout>
    <s:VerticalLayout verticalAlign="middle" horizontalAlign="center"/>
  </s:layout>
  <fx:Script>
    <![CDATA[
      import mx.collections.ArrayCollection;
      import mx.controls.Text;
      import mx.events.FlexEvent;
       
      protected function mxitemrenderer1_creationCompleteHandler(event:FlexEvent):void
      {
        var txt1:String = lbl.text.split(",")[0];
        var txt2:String = lbl.text.split(",")[1];
        lbl1.text = txt1;
        lbl2.text = txt2;
     
      }
       
    ]]>
  </fx:Script>
  <fx:Declarations>
    <!-- 将非可视元素(例如服务、值对象)放在此处 -->
  </fx:Declarations>
  <s:Label id="lbl" text="{dataGridListData.label}" visible="false" height="0"/>
   
  <s:VGroup  id="vp" width="100%" height="100%" gap="2" >
  <s:Label  id="lbl1" color="0x000000" textAlign="center" verticalAlign="middle" width="100%"/>
  <mx:HRule width="100%" chromeColor="0x999999" alpha="0.3"/>
  <s:Label  id="lbl2" color="0x000000" textAlign="center" verticalAlign="middle" width="100%"/>
  </s:VGroup>
  </s:MXDataGridItemRenderer>

Tags:

文章评论

最 近 更 新
热 点 排 行
Js与CSS工具
代码转换工具

<