I've used a SQL CTE to build a table that represents my hierarchy and now I'm trying to loop through those records to find the parent node, create a new node object and then append that new node object as a child of the parent node I found.
I've got a radtreeview with a parent node with a value of 0. I've tried accomplishing this two ways - neither works.
The following compiles without error, but doesn't add the newly created CurrentNode to the node I found in objMyTreeView.
objMyTreeView.FindNodeByValue("0").Nodes.Add(CurrentNode);
The following will find the parent node, but when I add the CurrentNode to it - I'm adding it to the ParentNode object - not the actual parent node in objMyTreeView.
RadTreeNode ParentNode = objMyTreeView.FindNodeByValue("0");
ParentNode.Nodes.Add(CurrentNode);
This seems like it should be simple - find the node with the value of the current node's parent, then add my current node as a child of the found node. Any advice offered would be appreciated. I must be overlooking something obvious.
~ Greg
I've got a radtreeview with a parent node with a value of 0. I've tried accomplishing this two ways - neither works.
The following compiles without error, but doesn't add the newly created CurrentNode to the node I found in objMyTreeView.
objMyTreeView.FindNodeByValue("0").Nodes.Add(CurrentNode);
The following will find the parent node, but when I add the CurrentNode to it - I'm adding it to the ParentNode object - not the actual parent node in objMyTreeView.
RadTreeNode ParentNode = objMyTreeView.FindNodeByValue("0");
ParentNode.Nodes.Add(CurrentNode);
This seems like it should be simple - find the node with the value of the current node's parent, then add my current node as a child of the found node. Any advice offered would be appreciated. I must be overlooking something obvious.
~ Greg