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

Change or disable dragging node text

2 Answers 43 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Nicolas
Top achievements
Rank 1
Nicolas asked on 27 Oct 2009, 11:09 AM
Hi,

this is probably an easy one but I can't figure it out.

When dragging a node from a Tree, the node's text is shown next to the cursor the whole dragging duration (when dragging a node called 'ABC', a text reading 'ABC' shows next to the cursor).
This causes me a problem under certain circumstances where the cursor actually gets over the text (when dragging fast), thus calling an undesired onmouseout event on any element it was hovering before.

I wanted to change the style and text of that tooltip anyway so I just made another that I can fully control. Now I want to remove the default text, but I can't figure how.

Any insight?

Thanks

2 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 30 Oct 2009, 08:05 AM
Hi Nicolas,

You need to subscribe to the OnClientNodeDragging event and get a reference to the dragging clue element. It is a DIV DOM element and you can control its properties like style, visibility, etc.

Here is an example:

<script type="text/javascript">
    function onNodeDragging(sender, e) {
        //get a reference to the DIV element of the dragging clue
        var dragElement = sender.get_draggingClueElement();
         
        $telerik.$(".rtIn", dragElement)[0].innerHTML = "my custom text";
         
        //uncomment next line to hide the dragging clue
        //dragElement.style.visibility = "hidden";
    }
</script>

Hope this helps.

Regards,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Nicolas
Top achievements
Rank 1
answered on 30 Oct 2009, 09:14 AM
Thank you, I totally missed that method.
Tags
TreeView
Asked by
Nicolas
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Nicolas
Top achievements
Rank 1
Share this question
or