Treeview Nodes added through web service

2 posts, 0 answers
  1. Akber Ali
    Akber Ali avatar
    7 posts
    Member since:
    Oct 2009

    Posted 05 Oct 2009 Link to this post

    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.
  2. Akber Ali
    Akber Ali avatar
    7 posts
    Member since:
    Oct 2009

    Posted 06 Oct 2009 Link to this post

    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.
Back to Top