在 flex 中刷新/重新加载数据网格 [英] refresh / reload a datagrid in flex

查看:29
本文介绍了在 flex 中刷新/重新加载数据网格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用数据网格.它具有 itemEditor 组件、组合框等作为列的 aprt.理想情况下,datagrid.invalidateList() 方法可以使用新的 dataProvider 数据重新加载数据网格.

I am using a datagrid. It has itemEditor components, combo boxes, etc. as aprt of columns. Ideally datagrid.invalidateList() method works to reload the datagrid with new dataProvider data.

但是,对我来说,它附加到旧数据,新数据添加到旧数据之下.我无法修复此数据网格的重新加载.

But, for me it is appending to the old data and new data gets added below the older data. I am not able to fix this reload of datagrid.

推荐答案

使用 ArrayCollection,而不是 Array!ArrayCollection 提供了您需要的所有变更通知机制.数组没有.

Use ArrayCollection, not Array! ArrayCollection provides all the change notification machinery you need. Array does not.

这篇关于在 flex 中刷新/重新加载数据网格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆