Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

How to prevent drop and change icon

$
0
0
Hello,

I am afraid, the OnClientNodeDropping client-side event does not have an equivalent of the OnClientNodeDropping's get_destNode() method.

You could do something like:
function OnClientNodeDragging(sender, eventArgs) {
    var hoveredElement = eventArgs.get_htmlElement().innerHTML;
    if (hoveredElement == "Root2") {
        eventArgs.get_htmlElement().style.color = "red";
    };
}

and hardcode (like I did with "Root2") all the Nodes that you don't want the user to drop the node on, which in combination with the OnClientNodeDropping would display an indication when the user drags a node over a drop-forbidden node and prevent the drop.

Regards,
Ivan Danchev
Telerik
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 Feedback Portal and vote to affect the priority of the items

Viewing all articles
Browse latest Browse all 94857

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>