在 Flex 中刷新/重新加载数据网格

发布于 2024-07-26 21:37:47 字数 175 浏览 5 评论 0原文

我正在使用数据网格。 它有 itemEditor 组件、组合框等作为列的一部分。 理想情况下,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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

晚风撩人 2024-08-02 21:37:47

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

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

樱娆 2024-08-02 21:37:47

我无法准确理解您的问题所在。 难道不能用新集合替换 DataGrid.dataProvider 吗?

I'm having a little trouble understanding exactly what your problem is. Can't you just replace DataGrid.dataProvider with the new collection?

最冷一天 2024-08-02 21:37:47

好吧,我明白了。 我只需要将数组清空即可。

所以现在它的 likeif arr 是一个充当数据提供者的数组。

arr=[];

这使得数组为空,然后我将其设置为数据提供者。

Well I got that. I just had to make my array empty.

so now its likeif arr is an array acting as dataprovider.

arr=[];

This makes the array empty and then i make it as dataprovider.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文