I'm trying to add nodes to the the tree using Client side scripting
Ive got the Context menu appearing when the user right clicks on a node. they get given 4 options
Add Node
Add Child Node
Remove Node
Node Properties
The last 3 work fine
Add Node works on nodes that are more than one level deep in the tree.
The problem starts when the parentNode property of the node passed is null.
this is what I currently have.
function AddNode(node, menuItemKey)
{
var co = webServiceCallerBody.createCallOptions();
co.funcName = \"AddNode\";
co.async = false;
var oResult;
if(node.ParentNode == null)
{
oResult = webServiceCallerBody.node.callService(co, null , document.all.TaxonomyListDropDownList.value);
node.TreeView.AddNodes('');
}
else
{
oResult = webServiceCallerBody.node.callService(co, node.ParentNode.Key , document.all.TaxonomyListDropDownList.value);
node.ParentNode.AddNodes('');
}
}
The line in red will throw an error becuase the TreeView doesnt have a AddNode or AddNodes Method.
How can you add to the root of the tree using client side script ?
also how can you start a tree if it has no nodes in it ?