Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
120
How to expand the webdatatree after clicking on a node and postback
posted

How can you determine which node was clicked from the post below so i can expand my webdatatree again to the node that was clicked?

You can easily expand out to a node on the server.  You will need to figure out which node was clicked, but then you can call node.ExpandAnscestors();  You can also set node.Expanded = true; for a node to be expanded.  So, I would try to put this code somewhere in the page load.  Let us know if this works or you need more help.

 

  • 14517
    Offline posted

    Hi,

    When using the WebDataTree you can determine the node clicked on the server by either using the WebDataTree ActiveNode property or in the NodeClick event using the eventargs Node property. For example, either of the following statements will get the text of the node clicked:

     WebDataTree1.ActiveNode.Text

     e.Node.Text (in NodeClick event)

    Thanks,
    Valerie