我想删除节点并再次插入。此代码删除节点,但不添加。可以添加TreeListNodes (newNodes)
吗TreeListNode (myNode)
?
我做错了什么?
TreeListNode myNode = treeList1.FindNode((node) => {
return node["ColumnName"].ToString() == "test";
});
var child = myNode.Nodes;
TreeListNodes newNodes = new TreeListNodes(treeList1);
for (int i = child.Count - 1; i >= 0; i--) {
newNodes.Add(child[i]);
treeList1.DeleteNode((DevExpress.XtraTreeList.Nodes.TreeListNode) child[i]);
}
myNode.Nodes.Add(newNodes);