Drag'n drop and load on demand

4 posts, 0 answers
  1. jorge
    jorge avatar
    23 posts
    Member since:
    Apr 2007

    Posted 17 Apr 2008 Link to this post

    I am implementing drag and drop between trees (client side) and load on demand.  When droping a node with ExpandMode = ServerSideCallBack the new node on the destination tree has no + sign, but double clicking on the node loads the children.  Here is my clone function:

            function cloneNodeTree(node)  
            {  
                  
                if (node.get_parent().get_value() != "Root")  
                {  
                    cloneNodeTree(node.get_parent());  
                }  
                var destTree = $find("userTree");  
                if (destTree.findNodeByText(node.get_text()) == null)  
                {  
                    var newNode = new Telerik.Web.UI.RadTreeNode();  
                    newNode.set_text(node.get_text());    
                    newNode.set_value(node.get_value());  
                    if (node.get_attributes().getAttribute("groupID") != null)  
                    {  
                        newNode.get_attributes().setAttribute("groupID", node.get_attributes().getAttribute("groupID"));  
                        newNode.get_nodes().clear();  
                        newNode.set_expandMode(2);  
                    }  
                    else 
                    {  
                        newNode.get_attributes().setAttribute("layerID", node.get_attributes().getAttribute("layerID"));  
                        newNode.set_expandMode(0);  
                    }  
                    newNode.set_imageUrl(node.get_imageUrl());  
                    //newNode.set_expandendImageUrl(node.get_expandedImageUrl());  
     
                      
                    if (node.get_parent().get_value() == "Root")  
                    {  
                        destTree.get_nodes().add(newNode);  
                    }  
                    else 
                    {  
                        destTree.findNodeByText(node.get_parent().get_text()).get_nodes().add(newNode);  
                    }  
                 }  
            }  
     

    What am I missing?

    Jorge
  2. Nikolay
    Admin
    Nikolay avatar
    3997 posts

    Posted 18 Apr 2008 Link to this post

    Hi jorge,

    Could you also paste the code you use to drag and drop the nodes along with the treeview declaration. It would be best if you isolate the problem in a small and running project and attach the files to a new support thread.

    Kind regards,
    Nick
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rainz
    Rainz avatar
    25 posts
    Member since:
    Nov 2005

    Posted 18 May 2008 Link to this post

    Also experiencing the same problem here.

    Happens any time a serversidecallback node (that isn't yet expanded) is moved with client-side drag and drop.

    The moved node loses its plus/expand symbol, but double-clicking still allows it to expand.

    Thanks for any help you can provide
  5. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 21 May 2008 Link to this post

    Hello,

    This appears to be a bug in the treeview.
    We found a workaround until the fix is ready.
    Please download the attached zip file and give it a try.

    Kind regards,
    Veskoni
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top