locked
TreeView1_SelectedNodeChanged laste leaf RRS feed

  • Question

  • User-1987825426 posted

    hi

    How can i simply now is i´m in the last leaf  and go to onother page please.

    My last leaf is like this "--/--/--"

    Response.Redirect("~/page 3.aspx");

    Thank you

    Monday, October 10, 2016 6:10 PM

Answers

  • User1724605321 posted

    Hi Rebotea,

    You could also check whether current node has child nodes  :

                TreeNode currentNode = treeview.SelectedNode;
                if (currentNode.ChildNodes.Count==0)
                {
    
                }

    Best Regards,

    Nan Yu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 11, 2016 7:16 AM

All replies

  • User-1987825426 posted

    Sorry i get the code.

     if (TreeView1.SelectedNode.Depth == 2)
            {

      }

    Monday, October 10, 2016 9:47 PM
  • User1724605321 posted

    Hi Rebotea,

    You could also check whether current node has child nodes  :

                TreeNode currentNode = treeview.SelectedNode;
                if (currentNode.ChildNodes.Count==0)
                {
    
                }

    Best Regards,

    Nan Yu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 11, 2016 7:16 AM