Flex ContextMenu 动态更改项目

发布于 2024-08-08 23:02:08 字数 145 浏览 1 评论 0原文

我在我的应用程序中使用 AdvancedDataGrid 的 ContextMenu。我可以实现网格的正常上下文菜单。现在,我计划使上下文菜单动态化。

例如,如果我单击特定单元格,我只需要在上下文菜单中查看与该单元格相关的项目。我们有什么办法可以做到这一点吗?

I am using a ContextMenu for an AdvancedDataGrid in my application. I could implement the normal context menu for the grid. Now, I am planning to make the context menu dynamic.

For example, if I click on a particular cell, I need to see only the items related to that cell in the Context Menu. Is there any way we can do that?

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

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

发布评论

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

评论(2

探春 2024-08-15 23:02:08

ContextMenu 类包含 customItems 属性(引用自 Adob​​e livedocs):

ContextMenuItem 对象的数组。数组中的每个对象代表您定义的上下文菜单项。使用此属性可以添加、删除或修改这些自定义菜单项。

要添加新菜单项,请创建一个 ContextMenuItem 对象,然后将其添加到 customItems 数组(例如,通过使用 Array.push())。有关创建菜单项的详细信息,请参阅 ContextMenuItem 类条目。

ContextMenu class contains a customItems property which is (quoting from Adobe livedocs):

An array of ContextMenuItem objects. Each object in the array represents a context menu item that you have defined. Use this property to add, remove, or modify these custom menu items.

To add new menu items, you create a ContextMenuItem object and then add it to the customItems array (for example, by using Array.push()). For more information about creating menu items, see the ContextMenuItem class entry.

池予 2024-08-15 23:02:08

我找到了这个问题的解决方案。非常简单:

http://www.pubbs.net/flex/200905/73331/

I found the solution for this. Quite simple:

http://www.pubbs.net/flex/200905/73331/

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