Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
My Code For Sinle Node Expand At a time Is It Posible to wright this code in javascript

C#
protected void CompleteMenu_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
    {


        string strNodeValue = e.Node.Value;

        if (e.Node.Parent == null)
        {
            foreach (TreeNode node in CompleteMenu.Nodes)
            {
                if (node.Value != strNodeValue)
                    node.Collapse();
            }
        }
        else
        {
            foreach (TreeNode node in e.Node.Parent.ChildNodes)
            {
                if (node.Value != strNodeValue)
                    node.Collapse();
            }
        }
    }
Posted
Comments
Sinisa Hajnal 18-Sep-14 2:04am    
There are plenty examples on the net. Yes, it is possible. Yes, you can do it yourself. Yes, you can search for it by yourself, instead of asking others to do it for you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900