Treeview: Dynamically added treenodes not available in codebehind

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top