This is a migrated thread and some comments may be shown as answers.

Canceling drag event

1 Answer 81 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 09 Oct 2008, 09:05 AM
Hi

I am using the tree's drag and drop. However, the 'drop' can occur on top of an ActiveX control. The tree view does not fire an onNodeDropping event. Instead, I capture the activeX mouseUp event and handle the drop functionality. However, because the tree control is not aware of the drop event, the tree still thinks it's dragging. This means it still shows the text of the draggging object from the tree when I do not want it to.

Is there a way within my function to cancel the drag/drop operation. I imagine I need to somehow get to the tree control and call a cancel drag/drop function.

Maybe code looking similar to this:-
function myMouseUp()  
{  
    cancelTelerikDragDrop();  
}  
 
function cancelTelerikDragDrop()  
{  
    var tree = $find("<%= RadTreeView1.ClientID %>");  
    tree.CancelDragDropOperation(); ????????  
}  
 



Thanks,
Martin

1 Answer, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 09 Oct 2008, 03:33 PM
Hi Martin,

You can call a private method of TreeView - tree._clearDrag(); This will cancel the drag'n'drop operation as you expect it to.

I hope this helps.

Best wishes,
Dimitar Milushev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
Martin
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
Share this question
or