Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/svn/5.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
Apache flex 刷新绑定的数据网格_Apache Flex - Fatal编程技术网

Apache flex 刷新绑定的数据网格

Apache flex 刷新绑定的数据网格,apache-flex,Apache Flex,我有一个问题..我正在将数组集合绑定到flex中的datagrid。我的问题是每当我尝试从数组集合中删除项时。。datagrid不会刷新值……这是我正在使用的代码 coinCount = coinCount - showArray.getItemAt(eventsList.selectedIndex).eventcost; pendingEventListArray.addItem(showArray.getItemAt(eventsList.selectedIn

我有一个问题..我正在将数组集合绑定到flex中的datagrid。我的问题是每当我尝试从数组集合中删除项时。。datagrid不会刷新值……这是我正在使用的代码

coinCount = coinCount - showArray.getItemAt(eventsList.selectedIndex).eventcost;
                pendingEventListArray.addItem(showArray.getItemAt(eventsList.selectedIndex));

showArray.removeItemAt(eventsList.selectedIndex);

showArray.refresh();
eventsList是绑定到
showArray
(数组集合)

两件事的数据网格:

  • 您的showArray是否声明为可绑定
  • 刷新用于刷新ArrayCollection上的筛选器。使用
    showArray.dispatchEvent(新事件(PropertyChangeEvent.PROPERTY\u CHANGE)
    ,或
    showArray.dispatchEvent(新事件(Event.CHANGE)

是,showArray在actionscript中声明为可绑定。我尝试将分派事件复制粘贴到我的代码中,但没有发生任何变化。它仍然是一样的…您不需要分派任何额外内容来刷新。ArrayCollection会自动执行此操作。请发布更多代码。尝试只使用带有n ArrayCollection以查看它是否有效。如果无效,请在此处发布。