Flex:AdvancedDataGrid 树 dropParent

发布于 2024-08-18 01:19:00 字数 386 浏览 9 评论 0原文

我有一个 AdvancedDataGrid 树,以 ArrayCollection 作为其数据提供者。例如,现在我将一片叶子从一个节点拖到另一个节点。为了捕获该事件,我添加了一个监听器来拖拽完成。

AdvancedDG.addEventListener(DragEvent.DRAG_COMPLETE, dRAG_COMPLETE_Handler);

公共函数 dRAG_COMPLETE_Handler(事件:DragEvent):void { var dropNode:Object = event.dropParent; <-- ??? 我

的问题:我想知道叶子被丢弃的新节点。实际上,我希望万一有一个像 dropParent 这样的属性。事实并非如此。

为我糟糕的英语感到遗憾。

I have an AdvancedDataGrid tree with a ArrayCollection as its dataprovider. Now, for instance, i drag a leaf from one node to another node. To catch the event I'm adding a Listener to dragComplete.

advancedDG.addEventListener(DragEvent.DRAG_COMPLETE, dRAG_COMPLETE_Handler);

public function dRAG_COMPLETE_Handler(event: DragEvent):void{
var dropNode:Object = event.dropParent; <-- ???
}

My Problem: I want to know the new node where the leaf was dropped. Actually i would have expected that in the event there is a property like dropParent. This is not the case.

Sry for my bad English.

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

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

发布评论

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

评论(1

把昨日还给我 2024-08-25 01:19:01

我会将监听器更改为dragDrop。现在你的拖动事件将有一个event.currentTarget,它是处理dragDrop事件的项目,你应该能够使用这个event.currentTarget来找到你正在寻找的父节点。

我希望我正确理解了你的问题并且这会有所帮助。
~迈克

I would change the listener to dragDrop. Now your drag event will have a event.currentTarget, which is the item processing the dragDrop event you should be able to use this event.currentTarget to find the parent node you are looking for.

I hope I have understood your question correctly and that this helps.
~Mike

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