Can someone please tell me the best way to indicate to a user why he cannot drop into a node.
For the sake of a contrived example, lets say there are three nodes
I do not want to allow the Brown or Boggs nodes to be dropped into Smith, because Smith does not begin with a 'B'.
I believe I know how to actually prevent the drop using DropQueryEvent but what would be the best way of indicating to the user the reason he cannot do the drop.
I am hoping there might be some sort of Tooltip thing but anything practical will do.
4 Answers, 1 is accepted
Yes, with the DragQuery event you can say that a drop should not be possible. Either there or in the DropInfo event with status "DropImpossible" you can access the e.Options.DragCue object.
In the case of the TreeView this object is the TreeViewDragCue which is an ItemsCotnrol that has the DragTooltipContent/Template and DragTooltipAction/Template are the properties that are looking for. They normally contain the current drop target and the drop action.
the Telerik team
I tried unsuccessfully to find a clue in your documention about how your suggestions might be used to display a tooltip that said "You Cannot drop here because Smith does not begin with B", when the mouse hovered over Smith,
I fully appreciate that as Telerik gets bigger it becomes harder to find the time to keep the documentation complete and up to date and also to provide the excellent service of the past.
Nevertheless, I will definitely be back searching for your advice in the future :-)
Many thanks anyway for your help on my current problem..
Indeed, this example was not available in the documentation. It will be added with a coming update.
I could not make out if you have managed to use these properties - I am attaching a sample project where this is shown.
We have always tried to listen and I can only urge you to point out things that can be improved.
Thanks for the feedback!
the Telerik team
I needed to make one or two minor changes to get things to work as in my case the tree is databound, but things seem to be working fine now. Smashing !