raddropdowntree Disable node level

4 posts, 0 answers
  1. Santosh
    Santosh avatar
    5 posts
    Member since:
    May 2014

    Posted 10 May 2014 Link to this post


     how to disabled raddropdowntree on particular node level .means i want my raddropdowntree level are configurable
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 12 May 2014 in reply to Santosh Link to this post

    Hi Santhosh,

    Please try the following C# code snippet to disable the particular level of nodes.

    C#:
    protected void raddroptreeDisableNode_NodeDataBound(object sender, DropDownTreeNodeDataBoundEventArguments e)
    {
        foreach (RadTreeNode node in raddroptreeDisableNode.EmbeddedTree.Nodes)
        {
            if (node.Level != 1)
            {
                foreach (RadTreeNode subnode in node.GetAllNodes())
                {
                    if (subnode.Level == 1)
                    {
                        subnode.Enabled = false;
                    }
                }
            }
        }
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Santosh
    Santosh avatar
    5 posts
    Member since:
    May 2014

    Posted 13 May 2014 in reply to Shinu Link to this post

    Hi In above code i am unable to find node.GetAllNodes() method  Please provide me alternative for that method
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 14 May 2014 in reply to Santosh Link to this post

    Hi Santhosh,

    The EmbeddedTree property of a RadDropDownTree is used to get the value of the tree in the dropdown. It provides reference to the embedded tree and you can easily use all of the properties and methods that are exposed with the tree control. This property is  available from Q2 2013 SP1 release. Please upgrade to latest version if you are using older one.

    Thanks,
    Shinu.
Back to Top