Completed
Last Updated: 29 Nov 2024 17:22 by ADMIN
Hannes
Created on: 19 Nov 2024 15:36
Category: TreeView
Type: Feature Request
1
Allow dragging an item outside the TreeView, so I can drop it on my custom target

The TreeView exposes drag events that allow me to detect when the user drags an item and to get the information for the dragged item. I want to be able to drag that item outside of the TreeView and drop it in my custom target.

I am aware that I should handle the custom drop functionality. However, the @ondrop event of my custom target currently does not fire for the tree item: https://blazorrepl.telerik.com/QIblPZvd0412k6U128.

1 comment
ADMIN
Nadezhda Tacheva
Posted on: 29 Nov 2024 17:22

Hi Hannes and everyone who follows this item,

Based on product specifics, the TreeView internally does not use draggable events, it uses pointer events to handle the dragging. Therefore, the @ondrop event of your custom target will expectedly not fire when dragging a TreeView item in it as the component expects a subsequent pointer event.

To handle dropping in a custom target, use the @onpointerup instead of the @ondrop event. You may find more details and an example in this knowledge base article: Drag TreeView Items to a Custom Target.

Having the above in mind, I am hereby marking this item as "Completed" as the desired behavior is possible with the current component capabilities.

Regards,
Nadezhda Tacheva
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.