D
deko
If I know the FullPath to a node in a TreeView, how do I insert a new node
under that node?
I need to run some code on DoubleClick of a node to get the value of the new
node I want to add to that node. Then, I need to reference that node in a
separate method so I can add the new node (that is, add the new node to the
Node that was double clicked).
In pseudo code, it might look like this:
private string m_nodePath = "";
private void tvwMyTreeView_NodeMouseDoubleClick(object sender,
TreeNodeMouseClickEventArgs e)
{
m_nodePath = tvwConfigurations.SelectedNode.FullPath;
callSomeMethodHereToGetNewNodeValue();
}
private void SomeOtherMethodToInsertNewNodeValue()
{
TreeNode myNewNode = tvwMyTreeView.Nodes(m_nodePath).Add(newNodeValue);
//How do I reference the node by FullPath?
}
Thanks in advance.
under that node?
I need to run some code on DoubleClick of a node to get the value of the new
node I want to add to that node. Then, I need to reference that node in a
separate method so I can add the new node (that is, add the new node to the
Node that was double clicked).
In pseudo code, it might look like this:
private string m_nodePath = "";
private void tvwMyTreeView_NodeMouseDoubleClick(object sender,
TreeNodeMouseClickEventArgs e)
{
m_nodePath = tvwConfigurations.SelectedNode.FullPath;
callSomeMethodHereToGetNewNodeValue();
}
private void SomeOtherMethodToInsertNewNodeValue()
{
TreeNode myNewNode = tvwMyTreeView.Nodes(m_nodePath).Add(newNodeValue);
//How do I reference the node by FullPath?
}
Thanks in advance.