Change or disable dragging node text

3 posts, 0 answers
  1. Nicolas
    Nicolas avatar
    57 posts
    Member since:
    Dec 2008

    Posted 27 Oct 2009 Link to this post


    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?

  2. Veselin Vasilev
    Veselin Vasilev avatar
    2992 posts

    Posted 30 Oct 2009 Link to this post

    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
            // = "hidden";

    Hope this helps.

    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.
  3. Nicolas
    Nicolas avatar
    57 posts
    Member since:
    Dec 2008

    Posted 30 Oct 2009 Link to this post

    Thank you, I totally missed that method.
Back to Top