Hi!
I have this tree that loads first some folders nodes then some document nodes.
The tree does not have a root node, all this nodes are added directly in the tree like this:
ASPX:
Code-behind:
My problem is when I try to move a document node to a folder node.
It throws this error:
"htmlfile: Invalid argument."
and then shows this in the Telerik.Web.UI.Common.Core.js I think
"_ba.get_childListElement().removeChild(this.get_element());"
I did test with a new project and the error did not happen, it moves normally even if the destination node does not have a father node. My real problem is that is hard to track/debug this issue. I simply do a insert
var destNodes = tempDestNode.get_nodes();
destNodes.insert(0,tempSourceNode); // .add() doesn't work either...
Any help?
Thanks.
I have this tree that loads first some folders nodes then some document nodes.
The tree does not have a root node, all this nodes are added directly in the tree like this:
ASPX:
| <telerik:RadTreeView |
| ID="DocumentTreeView" |
| Runat="server" |
| LoadingStatusPosition="BeforeNodeText" |
| CssClass="treeContainer" |
| AllowNodeEditing="True" |
| EnableDragAndDrop="True" |
| EnableDragAndDropBetweenNodes="True" |
| onnodeexpand="DocumentTreeView_NodeExpand" |
| onclientnodedropping="onNodeDropping" |
| onclientnodeediting="onClientEditing" EnableViewState="False" PersistLoadOnDemandNodes="False" |
| > |
| <CollapseAnimation Type="OutQuint" Duration="10"></CollapseAnimation> |
| <ExpandAnimation Type="OutQuart" Duration="10"></ExpandAnimation> |
| </telerik:RadTreeView> |
Code-behind:
| private void LoadDocsRootNodes() |
| { |
| IEnumerable<Node> folderNodes = DocumentDAO.Create().GetFoldersNodes(); |
| LoadTreeRootNodes(DocumentTreeView, folderNodes, "~/Images/icon_small_folder_c.gif", "df:"); |
| IEnumerable<Node> documentsNodes = DocumentDAO.Create().GetDocumentsNoFoldersNodes(); |
| LoadTreeRootNodes(DocumentTreeView, documentsNodes, "~/Images/icon_small_document.gif", "dc:"); |
| } |
| private void LoadTreeRootNodes(RadTreeView treeView, IEnumerable<Node> nodes, string imagePath, string itemType) |
| { |
| foreach (Node node in nodes) |
| { |
| RadTreeNode tempNode = new RadTreeNode(); |
| tempNode.Text = node.Text; |
| tempNode.Value = itemType + node.Id; |
| tempNode.ImageUrl = imagePath; |
| tempNode.ExpandMode = (node.HasChilds || node.HasIntroDocument) ? TreeNodeExpandMode.ServerSideCallBack : TreeNodeExpandMode.ClientSide; |
| treeView.Nodes.Add(tempNode); |
| } |
| } |
My problem is when I try to move a document node to a folder node.
It throws this error:
"htmlfile: Invalid argument."
and then shows this in the Telerik.Web.UI.Common.Core.js I think
"_ba.get_childListElement().removeChild(this.get_element());"
I did test with a new project and the error did not happen, it moves normally even if the destination node does not have a father node. My real problem is that is hard to track/debug this issue. I simply do a insert
var destNodes = tempDestNode.get_nodes();
destNodes.insert(0,tempSourceNode); // .add() doesn't work either...
Any help?
Thanks.