Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以在不同的 mxml 页面中销毁/关闭数据网格的打开项目编辑器或项目渲染器?
我听说过函数editedItemRenderer和destroyItemEditorDatagrid。我可以在不同的 mxml 页面中使用这些功能吗?
editedItemRenderer
destroyItemEditor
你的问题有点令人困惑。
Flex 应用程序不像 HTML 那样具有页面的概念。您可能指的是不同的视图或 MXML 组件。
所有 itemEditor 都根据需要创建和销毁。如果您没有在屏幕上查看 itemEditor,则可能是其他内容具有焦点,并且 itemEditor 已自动销毁。
在大多数情况下,两个组件不应该使用它们定义的 API 以外的任何东西相互通信。因此,您可以让一个组件调度一个事件,然后它的父级侦听该事件并让该父级调用另一个组件上的方法[例如 DataGrid]。