R
rune solheim
Hi,
I have a page with two treeviews. DblClicking on a treenode in treeview-one
adds a new treenode to treeview-two. I do this in javascript:
function myFunction(){
// get clicked node
var mySelectedNode =
event.srcElement.getTreeNode(event.srcElement.clickedNodeIndex);
// create new node with text and nodedata same as clicked node
var newNode = objSelectedTree.createTreeNode();
newNode.setAttribute("nodedata",
mySelectedNode.getAttribute("nodedata"));
newNode.setAttribute("text", mySelectedNode.getAttribute("text"));
// add new node to treeviewTwo
objTreeViewTwo.add(newNode);
}
This looks good in the browser. After submitting the page, in codebehind I
try to get the new nodes added to treeviewTwo, but they are no longer a part
of treeviewTwo. Nodes added dynamically are not posted
Can anyone help me with this?
Thanks
/Rune
I have a page with two treeviews. DblClicking on a treenode in treeview-one
adds a new treenode to treeview-two. I do this in javascript:
function myFunction(){
// get clicked node
var mySelectedNode =
event.srcElement.getTreeNode(event.srcElement.clickedNodeIndex);
// create new node with text and nodedata same as clicked node
var newNode = objSelectedTree.createTreeNode();
newNode.setAttribute("nodedata",
mySelectedNode.getAttribute("nodedata"));
newNode.setAttribute("text", mySelectedNode.getAttribute("text"));
// add new node to treeviewTwo
objTreeViewTwo.add(newNode);
}
This looks good in the browser. After submitting the page, in codebehind I
try to get the new nodes added to treeviewTwo, but they are no longer a part
of treeviewTwo. Nodes added dynamically are not posted
Can anyone help me with this?
Thanks
/Rune