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
