Flex教程/组件详解之一:DataGrid

FPGA调试利器:VIO与ILA在Vivado中的实战应用指南 本文详细介绍了Vivado中FPGA调试工具VIO与ILA的实战应用技巧。VIO作为虚拟输入/输出工具,可实时调整参数;ILA作为集成逻辑分析仪,能高效捕获内部信号。文章通过具体案例展示了如何配置ILA采样深度、触发条件,以及VIO的动态参数调整功能,帮助开发者提升上板调试效率,解决常见通信失败、数据不同步等问题。 阅读详情

Flex教程/组件详解之一:DataGrid(1-2)

今天来介绍一个DataGrid的使用,DataGrid是基于列表的控件,以表格的形式输出数据,可以当他是一个多列的list.
我们将从建立、数据填充、取值、删除、拖拽(?不晓得有没有打错)等几个方面来详细介绍DataGrid的用法,另外,每个由于当前网上普遍的教程都重在mxml描述进来介绍,忽略了由actionscript操作的相关介绍,所以教程从mxml跟as对比进行介绍:

1.建立DataGrid
2.设置表头
3.数据绑定
4.数据增加/删除/获取
5.DataGrid编辑数据(1)
6.DataGrid编辑数据(2):itemEditor/itemRenderer

建立DataGrid
我们先来介绍一下建立DataGrid,分别从mxml跟actionscript
mxml 

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
layout="absolute" width="600">
  <mx:DataGrid y="10" width="250" right="10">
  </mx:DataGrid>
</mx:Application>

actionscript 

<?xml version="1.0"?>
<mx:Application initialize="init()" xmlns:mx="http://www.adobe.com/2006/mxml" 
layout="absolute" width="600">
  <mx:Script>
    <![CDATA[
      private var DataGrid1:DataGrid;
      private function init():void{
        DataGrid1 = new DataGrid()
        DataGrid1.x = 10
        DataGrid1.y = 30
        DataGrid1.width = 250
        addChild(DataGrid1)
      }
    ]]>
  </mx:Script>
</mx:Application>



上面分别就是由两种方式建立的DataGrid,左边是actionscript右边是mxml,是不是觉得看起来怪怪的.当然~因为空空的~并不是我们常见到的样子..那么我们下面继续设置表头(列).

设置表头
所谓的表头,其实就是DataGrid的列.我们也从mxml跟actionscript两头进行:
mxml 

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
layout="absolute" width="600" fontFamily="宋体" fontSize="12">
  <mx:DataGrid id="DataGrid2" editable="true" width="300" y="30" right="10">
    <mx:columns>
      <mx:DataGridColumn headerText="序号" dataField="id"/>
      <mx:DataGridColumn headerText="名称" dataField="name"/>
      <mx:DataGridColumn headerText="数量" dataField="count"/>
    </mx:columns>
  </mx:DataGrid>
</mx:Application>


actionscript
DataGrid自身好像并没有提供设置列的方法,不过我们可以通用新建DataGridColumn,然后添加到DataGrid的columns属性里(ps:columns就是保存DataGrid列的属性.为DataGridColumn的数组).

<?xml version="1.0"?>
<mx:Application initialize="init()" xmlns:mx="http://www.adobe.com/2006/mxml" 
layout="absolute" width="600" fontFamily="宋体" fontSize="12">
  <mx:Script>
    <![CDATA[
      import mx.controls.*;
      import mx.controls.dataGridClasses.*;
      private var DataGrid1:DataGrid;
      private function init():void{
        DataGrid1 = new DataGrid()
        DataGrid1.x = 10
        DataGrid1.y = 30
        DataGrid1.width = 275
        addChild(DataGrid1)
        crColumn();//用脚本增加列
      }
      
      private function crColumn():void{
        var col:DataGridColumn
        
        col = new DataGridColumn()
        col.headerText = "序号"
        col.dataField = "id"
        DataGrid1.columns = DataGrid1.columns.concat(col)
        
        col = new DataGridColumn()
        col.headerText = "名称"
        col.dataField = "name"
        DataGrid1.columns = DataGrid1.columns.concat(col)
        
        col = new DataGridColumn()
        col.headerText = "数量"
        col.dataField = "count"
        DataGrid1.columns = DataGrid1.columns.concat(col)
      }
    ]]>
  </mx:Script>
</mx:Application>

这里要注意的时.虽然DataGrid.columns为保存列数据的数据,不过我们直接用操作DataGrid.columns将不会进行修改,而必须将修改后的DataGridColumn数组重新赋值给DataGrid,像上面看到的DataGrid1.columns = DataGrid1.columns.concat(col).

随便说明一下.mxml跟actionscript中出现的headerText,即为表头的文字,而dataField是绑定数据中相关的字段.关于这个,我们将在下节进行说明.

Flex教程/组件详解之一:DataGrid(3)

上节我们介绍了DataGrid的建立与设置表头,今天我们介绍一下DataGrid中重要的功能数据绑定(dataProvider).
DataGrid.的数据源技术多种数据格式.XML,Array,Model,我们分别说一下Array跟XML(Model跟XML类似).

数组(Array)形式的数据源.常用在数据源为写程序的时候已经设定好.非外部加载时比较多(外部加载一般为xml) 

[Bindable]
public var dataArr:Array = [{id:1,name:"苹果",count:100},
              {id:2,name:"西瓜",count:200},
              {id:3,name:"水蜜桃",count:50}]


这里随便介绍一下[Bindable],他的作用是把数据设置为可绑定...

看一下完成代码.我们在(1-2)节的文件上继续~

<?xml version="1.0"?>
<mx:Application initialize="init()" xmlns:mx="http://www.adobe.com/2006/mxml" 
layout="absolute" width="600" fontFamily="宋体" fontSize="12">
  <mx:Script>
    <![CDATA[
      import mx.controls.*;
      import mx.controls.dataGridClasses.*;
      private var DataGrid1:DataGrid;
      
      [Bindable]
      public var dataArr:Array = [{id:1,name:"苹果",count:100},
                    {id:2,name:"西瓜",count:200},
                    {id:3,name:"水蜜桃",count:50}]
      
      private function init():void{
        DataGrid1 = new DataGrid()
        DataGrid1.x = 10
        DataGrid1.y = 30
        DataGrid1.width = 275
        addChild(DataGrid1)
        crColumn();//用脚本增加列
        DataGrid1.dataProvider = dataArr
      }
      
      private function crColumn():void{
        var col:DataGridColumn
        
        col = new DataGridColumn()
        col.headerText = "序号"
        col.dataField = "id"
        DataGrid1.columns = DataGrid1.columns.concat(col)
        
        col = new DataGridColumn()
        col.headerText = "名称"
        col.dataField = "name"
        DataGrid1.columns = DataGrid1.columns.concat(col)
        
        col = new DataGridColumn()
        col.headerText = "数量"
        col.dataField = "count"
        DataGrid1.columns = DataGrid1.columns.concat(col)
      }
    ]]>
  </mx:Script>
  
  <mx:DataGrid id="DataGrid2" dataProvider="{dataArr}" width="275" y="30" right="10">
    <mx:columns>
      <mx:DataGridColumn headerText="序号" dataField="id"/>
      <mx:DataGridColumn headerText="名称" dataField="name"/>
      <mx:DataGridColumn headerText="数量" dataField="count" editorDataField="value"/>
    </mx:columns>
  </mx:DataGrid>
  
  <mx:Label x="440" y="10" text="mxml"/>
  <mx:Label x="104" y="10" text="actionscript"/>
  
</mx:Application>



绑定数据时必要注意的是.列中必须与数据中相应的字段(dataField).

另外,如果我们在没有设置列的情况下绑定数据.DataGrid将会根据数据的属性和生相应的列.并以属性名为表头.
像上面的代码我们把
//crColumn();//用脚本增加列
屏蔽了
并把mxml中的<mx:columns>节点
<!--mx:columns>
  <mx:DataGridColumn headerText="序号" dataField="id" />
  <mx:DataGridColumn headerText="名称" dataField="name"/>
  <mx:DataGridColumn headerText="数量" dataField="count"/>
</mx:columns-->
进行上面的注释,执行后将看到下边的效果.(注意看表头)



XML格式的数据般为外部加载而来,通用用来显示从数据库等查询后的数据.

[Bindable]
public var dataArr:XML = <data>
              <item id="1" count="100">
                <name>苹果</name>
              </item>
              <item id="2" count="200">
                <name>西瓜</name>
              </item>
              <item id="3" count="50">
                <name>水蜜桃</name>
              </item>
            </data>


xml跟数据的操作差不多..也是直接设置dataProvider即可..不过这里我们要传进去的不是dataArr,应该是dataArr.item,并且把相关的dataField进行修改~(注意dataField的区别,属性在这里应该使用"@属性名",熟悉xml的朋友都了解,我就不多读说了) 

<?xml version="1.0"?>
<mx:Application initialize="init()" xmlns:mx="http://www.adobe.com/2006/mxml" 
layout="absolute" width="600" fontFamily="宋体" fontSize="12">
  <mx:Script>
    <![CDATA[
      import mx.controls.*;
      import mx.controls.dataGridClasses.*;
      private var DataGrid1:DataGrid;
      
      [Bindable]
      public var dataArr:XML = <data>
                    <item id="1" count="100">
                      <name>苹果</name>
                    </item>
                    <item id="2" count="200">
                      <name>西瓜</name>
                    </item>
                    <item id="3" count="50">
                      <name>水蜜桃</name>
                    </item>
                  </data>
      private function init():void{
        DataGrid1 = new DataGrid()
        DataGrid1.x = 10
        DataGrid1.y = 30
        DataGrid1.width = 275
        addChild(DataGrid1)
        crColumn();//用脚本增加列
        DataGrid1.dataProvider = dataArr.item
      }
      
      private function crColumn():void{
        var col:DataGridColumn
        
        col = new DataGridColumn()
        col.headerText = "序号"
        col.dataField = "@id"
        DataGrid1.columns = DataGrid1.columns.concat(col)
        
        col = new DataGridColumn()
        col.headerText = "名称"
        col.dataField = "name"
        DataGrid1.columns = DataGrid1.columns.concat(col)
        
        col = new DataGridColumn()
        col.headerText = "数量"
        col.dataField = "@count"
        DataGrid1.columns = DataGrid1.columns.concat(col)
      }
    ]]>
  </mx:Script>
  
  <mx:DataGrid id="DataGrid2" dataProvider="{dataArr.item}"
 width="275" y="30" right="10">
    <mx:columns>
      <mx:DataGridColumn headerText="序号" dataField="@id"/>
      <mx:DataGridColumn headerText="名称" dataField="name"/>
      <mx:DataGridColumn headerText="数量" dataField="@count" editorDataField="value"/>
    </mx:columns>
  </mx:DataGrid>
  
  
  <mx:Label x="440" y="10" text="mxml"/>
  <mx:Label x="104" y="10" text="actionscript"/>
</mx:Application>

Flex教程/组件详解之一:DataGrid(4)

今天我们继续讲DataGrid,介绍一下DataGrid中数据的增加/删除/获取。

添加/删除
由于DataGrid的数据都绑定于Array或XML,所以我们需要增加记当或删除记录的时候..只需要对所绑定的数据进行相应的操作即可。这里就不多说了..一会直接看代码。
要提示一下的是..虽然数据与DataGrid进行的绑定.不过好像修改了数据源不会立刻更新..需要DataGrid对数据源进行一次反向操作(就在是DataGrid下进行编辑,下一节会介绍),才会进行更新,所以如果希望立刻更新的话..我们可以再指行一次数据指定..
DataGrid.dataProvider = 数据源

获取
这里所说的获取..是当我们对DataGrid进行的操作(点击项目)的时候..进行所点击的位置索引与数据的获取.
(如果要获取指定第几行,每几列的数据,这样对数据源进行操作即可)

当我们侦听itemClick事件的时候..将会接收到一个ListEvent事件对象..对象里分别有所点击单元格的列索引与列索引,我们就从这两个数据进行其它数据的获取..
(ps:下边提到的e为ListEvent事件对象..)
1.所点击的列的表头
(e.target as DataGrid).columns[e.columnIndex].headerText
2.点击的列索引
e.columnIndex
3.点击的行索引
e.rowIndex
4.点击的整行的数据(选中的数据)
(e.target as DataGrid).selectedItem
5.选中的单元格的数据
(e.target as DataGrid).selectedItem[(e.target as DataGrid).columns[e.columnIndex].dataField]

完整代码: 

<?xml version="1.0"?> 
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
layout="absolute" width="450" fontFamily="宋体" fontSize="12" height="400"> 
 <mx:Script> 
 <![CDATA[ 
 import mx.controls.*; 
 import mx.events.ListEvent;
 import mx.controls.dataGridClasses.*; 
 private var DataGrid1:DataGrid; 
 
 [Bindable]//原始数据
 public var dataArr:Array = [{id:1,name:"苹果",count:100}, 
 {id:2,name:"西瓜",count:200}, 
 {id:3,name:"水蜜桃",count:50}] 
 
 private function addItem():void{ 
        dataArr.push({id:uiId.value,name:uiName.text,count:uiCount.value})
        DataGrid2.dataProvider = dataArr
 } 
 private function delItem():void{ 
        dataArr.pop();
        DataGrid2.dataProvider = dataArr
 } 
 private function itemClick(e:ListEvent):void{
   var txt:String = "表头为: "+(e.target as DataGrid).columns[e.columnIndex].headerText+"/n"
   txt+="选中第 "+e.columnIndex+" 列/n"
   txt+="选中第 "+e.rowIndex+" 行/n"
   txt+="选中的行的数据为:/n"
   var dat:Object = (e.target as DataGrid).selectedItem
   for(var i:* in dat){
     txt+=" "+i+":"+dat[i]+"/n"
   }
   txt+="选中的单元可格的数据为 "+(e.target as DataGrid).selectedItem[(e.target as DataGrid).columns[e.columnIndex].dataField]+" /n"
   Alert.show(txt)
   }
 ]]> 
 </mx:Script> 
 
 <mx:DataGrid id="DataGrid2" itemClick="itemClick(event)" dataProvider="{dataArr}" width="430" y="10" x="10" height="208"> 
 <mx:columns> 
 <mx:DataGridColumn headerText="序号" dataField="id"/> 
 <mx:DataGridColumn headerText="名称" dataField="name"/> 
 <mx:DataGridColumn headerText="数量" dataField="count" editorDataField="value"/> 
 </mx:columns> 
 </mx:DataGrid> 
 <mx:NumericStepper id="uiId" x="10" y="241" width="150"/>
 <mx:TextInput id="uiName" x="10" y="288" width="150"/>
 <mx:NumericStepper id="uiCount" x="10" y="335" width="150"/>
 <mx:Label x="10" y="224" text="序号:"/>
 <mx:Label x="10" y="271" text="名称:"/>
 <mx:Label x="10" y="318" text="数量:"/>
 <mx:Button click="addItem()" x="10" y="368" label="添加" width="150"/>
 <mx:Button click="delItem()" x="290" y="368" label="删除最后一个" width="150"/>
</mx:Application>

Flex教程/组件详解之一:DataGrid(5)

今天继续介绍一下DataGrid的编辑功能,
编辑状态操作非常简单,只需要设置editable="true",
但需要注意的事,要先设置DataGrid开启全局的编辑功能,
然后再针对DataGridColumn(列)把不需要编辑的列用editable="false"取消编辑功能。

<?xml version="1.0"?> 
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
layout="absolute" width="450" fontFamily="宋体" fontSize="12" height="230"> 
 <mx:Script> 
 <![CDATA[ 
 import mx.controls.*; 
 import mx.events.ListEvent;
 import mx.controls.dataGridClasses.*; 
 private var DataGrid1:DataGrid; 
 
 [Bindable]//原始数据
 public var dataArr:Array = [{id:1,name:"苹果",count:100}, 
 {id:2,name:"西瓜",count:200}, 
 {id:3,name:"水蜜桃",count:50}] 
 ]]> 
 </mx:Script> 
 
 <mx:DataGrid editable="true" id="DataGrid2" 
dataProvider="{dataArr}" width="430" y="10" x="10" height="208"> 
 <mx:columns> 
 <mx:DataGridColumn headerText="序号" dataField="id" editable="false"/> 
 <mx:DataGridColumn headerText="名称" dataField="name"/> 
 <mx:DataGridColumn headerText="数量" dataField="count"/> 
 </mx:columns> 
 </mx:DataGrid> 
</mx:Application> 

Flex教程/组件详解之一:DataGrid(6)

今天我们继续讲DataGrid,介绍一下DataGrid中的itemEditor和itemRenderer.

从字面上的意思,我们可以理解itemEditor为DataGrid的单元格编辑器,而itemRenderer则为渲染器,就是说.itemEditor只会在单元格处理编辑状态下才会出现.而itemRenderer则是一直显示(就是网友关心的,自定义DataGrid的列)

我们继续之前应用到的代码.
首先我们看看在mxml中定义itemEditor/itemRenderer的方法.定义代码在columns中进行(表头),只要在相应的列中,设定<mx:itemRenderer>/<mx:itemEditor>,然后选择你需要使用的组件,另外这里要注意的是..设置了itemEditor/itemRenderer的DataGridColumn,需要增加一个editorDataField,相应的填上你选择的组件的属性.如这里..我需要的是NumericStepper的value属性.所以填上editorDataField="value",这样.当NumericStepper修改时..相应的单元格的值就会变成NumericStepper的value属性的值. 

<mx:DataGridColumn headerText="数量" dataField="count" editorDataField="value">
  <mx:itemEditor>
    <mx:Component>
      <mx:NumericStepper maximum="1000" minimum="10">
      </mx:NumericStepper>
    </mx:Component>
  </mx:itemEditor>
</mx:DataGridColumn>


而as的写法..大概跟上面类似.,需要注意的是.用代码设置itemRenderer时.接受的类形是ClassFactory.,如果需要给选择的组件(这里是NumericStepper),需要设置ClassFactory的properties属性.为一个object,我们看看代码 

  col = new DataGridColumn()
  col.headerText = "价格"
  col.dataField = "price"
  col.editable = false
  var itemRenderer:ClassFactory = new ClassFactory(NumericStepper);
  itemRenderer.properties = {maximum:1000,minimum:10}
  col.itemRenderer = itemRenderer
  col.editorDataField = "value"

itemEditor类似这里不说明了

看看完整的代码 

<?xml version="1.0"?>
<mx:Application initialize="init()" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" fontFamily="宋体" fontSize="12" width="424" height="396">
  <mx:Script>
    <![CDATA[
      import mx.controls.*;
      import mx.controls.dataGridClasses.*;
      private var DataGrid1:DataGrid
      [Bindable]
      public var dataArr:Array = [{id:1,name:"苹果",price:100,count:100},
                    {id:2,name:"西瓜",price:50,count:200},
                    {id:3,name:"水蜜桃",price:333,count:50}]
      private var aaa:Object
      private function init():void{
        DataGrid1 = new DataGrid()
        DataGrid1.editable = true
        DataGrid1.x = 10
        DataGrid1.y = 10
        addChild(DataGrid1)
        crColumn()
        addItem()
      }
      private function crColumn():void{
        var col:DataGridColumn
        
        col = new DataGridColumn()
        col.headerText = "序号"
        col.dataField = "id"
        col.editable = false
        DataGrid1.columns = DataGrid1.columns.concat(col)
        
        col = new DataGridColumn()
        col.headerText = "名称"
        col.dataField = "name"
        DataGrid1.columns = DataGrid1.columns.concat(col)
        
        
        col = new DataGridColumn()
        col.headerText = "价格"
        col.dataField = "price"
        col.editable = false
        var itemRenderer:ClassFactory = new ClassFactory(NumericStepper);
        itemRenderer.properties = {maximum:1000,minimum:10}
        col.itemRenderer = itemRenderer
        col.editorDataField = "value"
        DataGrid1.columns = DataGrid1.columns.concat(col)        
        
        
        col = new DataGridColumn()
        col.headerText = "数量"
        col.dataField = "count"
        var itemEditor:ClassFactory = new ClassFactory(NumericStepper);
        itemEditor.properties = {maximum:1000,minimum:10}
        col.itemEditor = itemEditor
        col.editorDataField = "value"
        DataGrid1.columns = DataGrid1.columns.concat(col)
      }
      private function addItem():void{
        DataGrid1.dataProvider = dataArr
      }
    ]]>
  </mx:Script>

  <mx:DataGrid id="DataGrid2" editable="true" dataProvider="{dataArr}" y="200" x="10">
    <mx:columns>
      <mx:DataGridColumn headerText="序号" dataField="id" editable="false"/>
      <mx:DataGridColumn headerText="名称" dataField="name"/>
      <mx:DataGridColumn headerText="价格" dataField="price" editorDataField="value" editable="false">
        <mx:itemRenderer>
          <mx:Component>
            <mx:NumericStepper maximum="1000" minimum="10">
            </mx:NumericStepper>
          </mx:Component>
        </mx:itemRenderer>
      </mx:DataGridColumn>
      <mx:DataGridColumn headerText="数量" dataField="count" editorDataField="value">
        <mx:itemEditor>
          <mx:Component>
            <mx:NumericStepper maximum="1000" minimum="10">
            </mx:NumericStepper>
          </mx:Component>
        </mx:itemEditor>
      </mx:DataGridColumn>
    </mx:columns>
  </mx:DataGrid>
</mx:Application>

STM32F030C8烧录实战:用J-Link Commander实现一键批量烧写(附完整脚本) 本文详细介绍了如何使用J-Link Commander工具链实现STM32F030C8的一键批量烧录,包括环境配置、批处理脚本设计、命令脚本解析以及生产环境实战技巧。通过自动化烧录流程,显著提升效率并降低人为错误,特别适合量产和频繁迭代的开发场景。 阅读详情

相关推荐

从零到一:基于DESeq2的转录组差异表达分析实战指南

本文详细介绍了基于DESeq2的转录组差异表达分析实战指南,涵盖数据准备、标准化处理、差异分析及结果解读等关键步骤。DESeq2凭借其稳定性和对低表达基因的友好处理,成为转录组数据分析的首选工具。文章还提供了常见问题排查和优化建议,帮助研究者高效完成从分析到发表的完整流程。

weixin_26759093的博客 270

Flex Datagrid常用属性说明

DataGrid组件常用的属性属    性说    明columns获取或设置一个DataGridColumn对象数组,每个可以显示的列为一个对象editable指示用户能否编辑数据提供者中的项目editedItemPosition获取或设置正在编辑的数据提供者项

babylon_0049的专栏 1887

自动驾驶仿真 (四)—— 基于PreScan与Simulink的AEB系统多场景验证

本文详细介绍了基于PreScan与Simulink的AEB系统多场景验证方法,涵盖标准场景搭建、复杂工况扩展及控制策略优化。通过仿真技术,显著降低测试成本并提升场景覆盖率,有效解决实车测试中的痛点问题。特别适用于自动驾驶领域的AEB系统开发与验证。

weixin_28273593的博客 248

Flex教程/组件详解之一:DataGrid(3)

<br />上节我们介绍了DataGrid的建立与设置表头,今天我们介绍一下DataGrid中重要的功能数据绑定(dataProvider).<br />DataGrid.的数据源技术多种数据格式.XML,Array,Model,我们分别说一下Array跟XML(Model跟XML类似).<br /><br />数组(Array)形式的数据源.常用在数据源为写程序的时候已经设定好.非外部加载时比较多(外部加载一般为xml) <br />[Bindable]<br />public var dataArr:A

技术交流 1076

从零构建AI Agent集群:Docker Compose与Nginx部署实战

在AI应用开发领域,微服务架构和容器化部署已成为提升开发效率和系统可维护性的关键技术。Docker Compose作为容器编排工具,能够将多个独立服务(如Node.js、Python应用)及其依赖(数据库、缓存)封装在隔离环境中,并通过统一配置文件定义服务间的网络与依赖关系,实现一键启停。Nginx作为反向代理,则提供了统一的网络入口、请求路由和负载均衡能力,是构建高可用Web应用的基石。这种组合技术方案的价值在于,它能将复杂的AI系统(如工作流引擎、对话Agent、技能库)的部署运维复杂度大幅降低,使得开

weixin_27028523的博客 638

别再手动连线了!用Tessent IJTAG的SIB和TDR,5分钟搞定复杂芯片的DFT网络分区

本文探讨了如何利用Tessent IJTAG的SIB(Segment Insertion Bit)和TDR(Test Data Register)技术,高效解决复杂芯片DFT网络分区问题。通过智能化的扫描链管理和声明式定义,显著降低连接复杂度,提升测试覆盖率和良率,适用于超大规模SoC设计。

weixin_29251131的博客 300

FlexGrid 属性 方法

说明:O 表示 VSFlexGrid 对象的名,A 表示当前属性名,|表示可选 ---------------------------------------------------------------------------------------------------------- 属性/方法名称 功能 示例语法 AddIte

不懂不懂 5783

2025最新正版Autodesk 3ds Max 2022安装教程:从下载到中文环境配置全流程解析

Autodesk 3ds Max 2022是一款专业的三维建模、动画和渲染软件,广泛应用于影视制作、游戏开发、建筑可视化等领域。

waicsdn_haha的博客 1万+

Flex DataGrid设置不同行的渲染颜色

<rowColor:RowColorDataGrid id="dategrId" sortableColumns="false" width="100%" height="100%" fontSize="12" dataProvider="{resultArr}" headerH

damaolly的专栏 1402

基于学术研究于NASA官网GPM卫星数据下载详细教程

基于学术研究于NASA官网GPM卫星数据下载详细教程

珞瑜的博客 8654

基于STM32L4XX、HAL库的AD7124模数转换器ADC驱动程序设计

/ 检查ID是否正确 (AD7124-4/AD7124-8有不同的ID)// 转换为电压值 (假设使用内部2.5V基准)// 构造读命令: 1(R/W) + 1(0) + 6(寄存器地址)// 构造写命令: 0(R/W) + 1(0) + 6(寄存器地址).config = 0, // 使用配置0。内置可编程增益放大器(PGA):1-128倍。// 读取ADC数据。// 读取当前ADC控制寄存器。// 检查数据是否就绪。// 写回ADC控制寄存器。// 初始化AD7124。

zhusl6688的博客 519

flex datagrid 动态设置行背景色

在实际的项目需求中,如果要求,某一列的背景色统一,并且其他列的背景色呈规律颜色(奇偶)出现,并且替换datagrid行交替颜色,这时,我们可以通过重写datagrid的方法并结合datagridColumn的backgroundColor来实现。不管tr行背景颜色如何,datagridcolumn的backgroundColor始终会覆盖其颜色。   实现类: private var _...

zh_dream_success的专栏 423

AUTOSAR OS详细介绍及配置说明(更新版20240115)

AUTOSAR OS扩展了OSEK/VDX标准中的操作系统,所以本文结合OSEK/VDX的标准来介绍AUTOSAR OS,并借助Vector Configurator讲解AUTOSAR OS的配置。源于德语,英文意思是:“车载电子设备的开发系统和接口”,它是一个标准,用来产生嵌入式操作系统的规范,通讯协议栈,和汽车网络管理协议,也产生其他相关的规范。OSEK被设计来提供整车的各种电子控制单元的软件标准架构。

酒无忧的博客 1422

Flex教程/组件详解之一:DataGrid(6)

<br />今天我们继续讲DataGrid,介绍一下DataGrid中的itemEditor和itemRenderer.<br /><br />从字面上的意思,我们可以理解itemEditor为DataGrid的单元格编辑器,而itemRenderer则为渲染器,就是说.itemEditor只会在单元格处理编辑状态下才会出现.而itemRenderer则是一直显示(就是网友关心的,自定义DataGrid的列)<br /><br />我们继续之前应用到的代码.<br />首先我们看看在mxml中定义itemE

技术交流 1423

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

Flex教程/组件详解之一:DataGrid(4)

Flex教程/组件详解之一:DataGrid(4)| 作者: L4cd.Net ] 字号: 大 | 中 | 小 今天我们继续讲DataGrid,介绍一下DataGrid中数据的增加/删除/获取。 添加/删除由于DataGrid的数据都绑定于Array或XML,所以我们需要增加记当或删除记录的时候..只需要对所绑定的数据进行相应的操作即可。这里就不多说了..一会直接看代码。要提示一下的是..虽然

950

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

Flex教程/组件详解之一:DataGrid(5)

<br />今天继续介绍一下DataGrid的编辑功能,<br />编辑状态操作非常简单,只需要设置editable=""true"",<br />但需要注意的事,要先设置DataGrid开启全局的编辑功能,<br />然后再针对DataGridColumn(列)把不需要编辑的列用editable=""false""取消编辑功能。<br /><?xml version=""1.0""?> <br /><mx:Application xmlns:mx=""http://www.adobe.com/2006/m

技术交流 907

Flex教程/组件详解之一:DataGrid(1-2)

<br /><br />今天来介绍一个DataGrid的使用,DataGrid是基于列表的控件,以表格的形式输出数据,可以当他是一个多列的list.<br />我们将从建立、数据填充、取值、删除、拖拽(?不晓得有没有打错)等几个方面来详细介绍DataGrid的用法,另外,每个由于当前网上普遍的教程都重在mxml描述进来介绍,忽略了由actionscript操作的相关介绍,所以教程从mxml跟as对比进行介绍:<br /><br />1.建立DataGrid<br />2.设置表头<br />3.数据绑定<b

技术交流 1088

FLEX 中的DataGrid使用

<br />Flex教程/组件详解之一:DataGrid(1-2)<br />今天来介绍一个DataGrid的使用,DataGrid是基于列表的控件,以表格的形式输出数据,可以当他是一个多列的list.<br />我们将从建立、数据填充、取值、删除、拖拽(?不晓得有没有打错)等几个方面来详细介绍DataGrid的用法,另外,每个由于当前网上普遍的教程都重在mxml描述进来介绍,忽略了由actionscript操作的相关介绍,所以教程从mxml跟as对比进行介绍:<br /><br />1.建立DataGri

技术交流 1万+

flex中的DataGrid组件

flex中的DataGrid组件 分类: Flex 2010-11-15 16:50 521人阅读 评论(0) 收藏 举报 实际上,DataGrid组件是属于列表组件的,之所以单独拿出来讲解,主要是因为 DataGrid组件有着很强大的功能,也有很多扩展的应用是在开发中经常用到的。DataGrid组件是按照行和列的形式显示数据的。有几个类是只有 DataGrid组件才

iceice0o0o的专栏 805

Flex4.5DataGrid表格组件运用

今天看看DataGrid组件吧,这个还是很简单的,所以内容会很少。 照例,代码: http://ns.adobe.com/mxml/2009"       xmlns:s="library://ns.adobe.com/flex/spark"       xmlns:mx="library://ns.adobe.com/flex/mx"       minWidth="955" mi

First_Xiaohu的专栏 1092

Flex4 Halo组件 List 和 DataGrid

Flex1 到 Flex3 使用的都是 Halo组件,这里将介绍Halo 组件中的List 和 DataGrid 。其中 DataGrid 是显示多列数据中最常用的方式。但是在Spark中还有没对应DataGrid的组件。 先写个“食物”的模型 Dinner.as 。 package model { [Bindable] public class Dinner { public

PrinceTerence的专栏 1374

flex DataGrid根据数据动态显示行颜色(重写DataGrid组件)

需求:能根据记录的紧急程度显示不同的颜色,如 紧急,该行要用红色表示。 MyDataGrid组件代码:package common.flash.datagrid { import flash.display.Sprite; import mx.collections.ArrayCollection; import mx.controls.DataGrid; public cla

4867

Flex 四种方式设置dataGrid表头颜色

有时候需要改变dataGrid表头颜色,整理了四种方式,大家还有其他方式可以讨论下。 1.直接通过as代码设置 grid1.setStyle("headerColors", ["red", "blue"]); 2.使用MXML标签设置 #FF0000 0x0000FF 3.使用CSS设置 #grid3 { head

q3581353的专栏 4111

FLEX DATAGRID 自动滚屏

<br />工作需要表格自动滚动和单元格变色,网上没找到合适的,所以自己做了个小例子,初学FLEX,求交流,抛砖引玉...<br /> <br />组件:WindowUI<br /> <br /><?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" > <mx:Script> <![CDATA[ impo

Cat的专栏 957

flex中dataGrid的编辑功能

在flex的dataGrid中,很多情况下列是需要嵌入其他的控制的,比如:checkbox,combox等,此时需要利用dataGrid的如下功能:1.datagrid编辑功能简介    当我们点击datagrid中的一个单元格进行编辑时,可结合使用一些组件,RadioButtonGroup、checkbox、ComboBox等    datagrid的编辑功能必须使用以下组件:editorD

wuyan520的专栏 1万+

FLEX如何动态创建DataGrid组件详解

初学FLEX时,需要在AS里动态生成DataGrid,结果搞了很久才搞明白怎么把用MXML写出来的DataGrid改成用AS写出来,其中最主要的就是自定义itemEditor、itemRender怎么写,写篇东西整理总结下。 先看看下面这段代码:

程序员—形同陌路 3115

Flex DataGrid通用分页组件

<br />在进行flex编程时,经常会用到在dataGrid中分布显示数据,但是在每个页面中都写一遍查询,显示,控制翻页的代码,既烦琐,又不美观,于是我就写一个比较通用的查询组件。<br />代码CommonQueryComponent.as:<br />package cn.zlj.component<br />{<br /> import mx.collections.ArrayCollection;<br /> import mx.controls.DataGrid;<br /> import mx

tiancai645的专栏 637
上一篇: 人生要小心处理的50件事
下一篇: 修改DataGrid选中颜色
h3clikejava
博客等级 码龄16年 2粉丝 8原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值