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

Drag&Drop - Show wether drag is allowed dynamically

1 Answer 56 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Manuel Ruf
Top achievements
Rank 1
Manuel Ruf asked on 04 Aug 2010, 06:07 PM
Hello all,

Is it possible to dynamically show the user whether a d&d operation on the tree is allowed?
I would like that whenever the user drags over an item in the treeview that a function is called which evaluates whether a drop is possible there.
Of course the d&d indicator should change colour or otherwise indicate that the d&d operation is possible or not.
That should happen while the user is dragging and not when he is letting go of the item. Otherwise its frustrating as the user will have to find out by trial and error where a drop is allowed.

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 09 Aug 2010, 05:46 PM
Hello Manuel Ruf,


The feature you are seeking is implemented. You can use the DropQuery event in order to implement your logic and decide whether the drop is allowed or not.
SampleTreeView.AddHandler(RadDragAndDropManager.DropQueryEvent, 
    new EventHandler<DragDropQueryEventArgs>(OnDropQuery), true);

Also you can take a look at the following article for more details: http://www.telerik.com/help/silverlight/raddraganddrop-events.html

I'm attaching a working sample demonstrating this.


Kind regards,
Hristo Milyakov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Manuel Ruf
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or