Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 如何更改Flex ArrayCollection中项目的值_Actionscript 3_Apache Flex - Fatal编程技术网

Actionscript 3 如何更改Flex ArrayCollection中项目的值

Actionscript 3 如何更改Flex ArrayCollection中项目的值,actionscript-3,apache-flex,Actionscript 3,Apache Flex,我有一个具有预定义值的ArrayCollection。我想为arrayCollection中的项指定一个新值。此新值在datagrid ItemEditEnd之后定义 private var tabRV :Array=[ {thevalue:"25",height:"115",col:"foo"}, {thevalue:"45",height:"115", col:"foo"}, {thevalue:

我有一个具有预定义值的ArrayCollection。我想为arrayCollection中的项指定一个新值。此新值在datagrid ItemEditEnd之后定义

private var tabRV :Array=[
                {thevalue:"25",height:"115",col:"foo"},
                {thevalue:"45",height:"115", col:"foo"},
                {thevalue:"15",height:"115",col:"bb"},
                {thevalue:"95",height:"115", col:"aa"},
                ];

    [Bindable] 
    public var acRDV:ArrayCollection=new ArrayCollection(tabRV);
我的ItemEditEnd,如下所示:

private function getCellInfo(event:DataGridEvent):void {


            // Get the new value from the editor.
            var newVal:String = event.currentTarget.itemEditorInstance.htmlText;

            // Get the old value.
            var oldVal:String = 
                event.currentTarget.editedItemRenderer.data[event.dataField]; 
            DP_LISTEREDVCLI[event.rowIndex].thevalue=newVal;
            DP_LISTEREDVCLI[event.rowIndex].col=1;
            trace("xml new val "+DP_LISTEREDVCLI[event.rowIndex].[event.columnIndex]+"/"+DP_LISTEREDVCLI[event.rowIndex].[DP_LISTEREDVCLI.length]);


        } 
我希望创建一个通用函数DP_listedvcli[event.rowIndex][event.columnIndex],但它不起作用。实际上,在本例中,一个新属性正在创建[event.columnIndex value]


谢谢你的帮助

很抱歉,我不确定你的问题是什么。这对我来说似乎很复杂。为什么不在ItemEditor中编辑数据(可能使用数据绑定)?这就是它的用途。我用itemrenderer编辑数据,但我需要更新dataprovider。