销毁 Flex 中打开的项目编辑器或项目渲染器

发布于 2024-09-19 13:04:51 字数 166 浏览 0 评论 0原文

是否可以在不同的 mxml 页面中销毁/关闭数据网格的打开项目编辑器或项目渲染器?

我听说过 Datagrid 上的 editedItemRendererdestroyItemEditor 函数。我可以在不同的 mxml 页面中使用这些函数吗?

Is it possible to destroy/close open item editor or item renderer of a datagrid in different mxml page?

I heard about the functions editedItemRenderer and destroyItemEditor on Datagrid. Can I use these functions in different mxml page?

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

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

发布评论

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

评论(1

北陌 2024-09-26 13:04:51

你的问题有点令人困惑。

Flex 应用程序不像 HTML 那样具有页面的概念。您可能指的是不同的视图或 MXML 组件。

所有 itemEditor 均根据需要创建和销毁。如果您没有在屏幕上查看 itemEditor,则可能有其他东西获得焦点并且 itemEditor 被自动销毁。

在大多数情况下,两个组件不应使用除其定义的 API 之外的任何内容来相互通信。因此,您可以让一个组件调度一个事件,然后它的父组件侦听该事件,并让该父组件调用另一个组件 [例如 DataGrid] 上的方法。

Your question is a bit confusing.

Flex Applications do not have the concept of a page in the same way that HTML does. You probably mean different views, or MXML Components.

All itemEditors are created and destroyed as needed. If you are not viewing the itemEditor on screen, then likely something else has focus and the itemEditor was destroyed automatically.

In most cases, two components should not talk to each other using anything other than their defined API. so, you can have one component dispatch an event, then it's parent listen for the event and have that parent call methods on another component [such as a DataGrid].

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