This is a migrated thread and some comments may be shown as answers.

TriStateCheckBoxes=true with Uncheckable nodes results in odd behaviour..

1 Answer 36 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Nikolaj
Top achievements
Rank 1
Nikolaj asked on 06 Jan 2012, 02:14 PM
Hi,
I've experienced odd behavior with the RadTreeView when i got 3 levels of nodes.. first 2 leves are normal checkable nodes and the 3. level is uncheckable nodes for info etc.
When i check any of the nodes on the 2. level, the parent node is checked even though it should be marked as undetermined.. first bug. When i uncheck the node i just checked, the parent node still remain checked.

Markup:
<telerik:RadTreeView ID="RadTreeView1" runat="server" ExpandAnimation-Type="None"
CheckBoxes="true" TriStateCheckBoxes="true">
</telerik:RadTreeView>


Code:
   protected void Page_Load(object sender, EventArgs e)
        {
            RadTreeView1.Nodes.Clear();
            RadTreeNode node = null;
 
            node = new RadTreeNode("AAA", "aaa");
            RadTreeView1.Nodes.Add(node);
            AddNodes(node);
        }
 
        private void AddNodes(RadTreeNode parent)
        {
            RadTreeNode node = null;
 
            node = new RadTreeNode("111", parent.Value + "_111");
            AddInfoNodes(node);
            parent.Nodes.Add(node);
 
            node = new RadTreeNode("222", parent.Value + "_222");
            AddInfoNodes(node);
            parent.Nodes.Add(node);
        }
 
        private void AddInfoNodes(RadTreeNode parent)
        {
            RadTreeNode node = new RadTreeNode("foo", parent.Value + "_bar");
            node.Checkable = false; //Without this line everything works like it should....
            parent.Nodes.Add(node);
        }

Regards
Nikolaj Strauss
GROUP Live

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 09 Jan 2012, 01:39 PM
Hello Nikolaj,

Thank you for reporting this to us.

This turned out to be a bug in RadTreeView. I'm glad to inform you that the bug has been fixed and the fix will be available in our next internal build.

As a token of gratitude I have also updated you telerik points.

Regards,
Bozhidar
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
TreeView
Asked by
Nikolaj
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or