Prevent Auto-Expand of Nodes during Drag and Drop?

2 posts, 0 answers
  1. Richard
    Richard avatar
    27 posts
    Member since:
    Sep 2008

    Posted 27 Oct 2009 Link to this post


    The Drag-and-Drop example between a RadTreeView and a RadGrid works fine, but we need to lock-down the TreeView while the user drags to the RadGrid. You see, if the TreeView is large, and the user drags one of the top nodes slowly across the TreeView, then it is quite annoying for the TreeView to expand all the nodes while dragging... I've disabled "Dropping" on the TreeView, but that has no effect on the Expand mode, of course. Any tips on how to elegantly disable ExpandMode while dragging a node?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Oct 2009 Link to this post

    Hi Richard,

    Attach the OnClientNodeExpanding event to RadTreeView and cancel the event if you are dragging a node.

    <script type="text/javascript"
        function OnClientNodeExpanding(sender, args) { 
            if (sender._dragging) { 

  3. DevCraft R3 2016 release webinar banner
Back to Top