This is a migrated thread and some comments may be shown as answers.

Treeview Nodes added through web service

1 Answer 39 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Akber Ali
Top achievements
Rank 1
Akber Ali asked on 06 Oct 2009, 01:01 AM
Well this is my first post to this forum.

Problem: I am adding nodes to a TreeView via web service call. I click the + sign and the nodes are loaded with amazing speed. Now when each of these node is clicked I need to raise the usual NodeClick event on the server side, to access the node value and do redirection, but unfortunately it is not raised. Also there is context menu item added to each of node. This menu was added on the page PreRender. Since the options of this menu remain same for each of the node so I did it on the PreRender.  All nodes show context menu. But When I click any of the item of this context menu the server click event for context menu is raised. But again there I have no value for the e.node.value.

So, does it mean that if we add nodes through web service, we can't access/find the values of the nodes. Does it has some thing to do with view state.

looking forward for comments.

1 Answer, 1 is accepted

Sort by
0
Akber Ali
Top achievements
Rank 1
answered on 06 Oct 2009, 01:45 PM
So I resolved the problem. the problem was that I wanted to access the node values in code behind - but nodes added through web service call.

The secret was setting
PersistLoadOnDemandNodes="true" 
and now I am able to access all the values attached to a Node.

No doubt that that adding nodes through web service improved the performance amazingly.
Tags
TreeView
Asked by
Akber Ali
Top achievements
Rank 1
Answers by
Akber Ali
Top achievements
Rank 1
Share this question
or