Completed
Last Updated: 28 Dec 2018 06:23 by ADMIN
ADMIN
Hristo
Created on: 23 Jan 2017 16:18
Category: TreeView
Type: Bug Report
3
FIX. RadTreeView - incorrect check state when the control is in TriState mode and a fillter is applied
How to reproduce: 

   public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

       
        private void Form1_Load(object sender, EventArgs e)
        {

            radTreeView1.CheckBoxes = true;
            radTreeView1.TriStateMode = true;

            var rootNode = new RadTreeNode("Root Node");
            
            radTreeView1.Nodes.Add(rootNode);

            // Create two parent nodes
            var parentNode1 = new RadTreeNode("First Parent");
            var parentNode2 = new RadTreeNode("Second Parent");

            // Add the parent nodes to tree view's nodes collection
            rootNode.Nodes.AddRange(parentNode1, parentNode2);
            
            
            // Create a child node
            var radTreeNodes2 = new List<RadTreeNode>
            {
                new RadTreeNode("nA.1"),
                new RadTreeNode("nB.2"),
                new RadTreeNode("nC.3"),
                new RadTreeNode("nD.4"),
                new RadTreeNode("nE.5"),
            };
            
            var radTreeNodes = new List<RadTreeNode>
            {
                new RadTreeNode("nA.1"),
                new RadTreeNode("nB.2"),
                new RadTreeNode("nC.3"),
                new RadTreeNode("nD.4"),
                new RadTreeNode("nE.5"),
            };
            
            // Add the child node to the first parent's nodes collection
            parentNode1.Nodes.AddRange(radTreeNodes);
           
            // Remove the child from the first parent collection and add it to the second parent nodes collection
            //parentNode1.Nodes.Remove(childNode);
            parentNode2.Nodes.AddRange(radTreeNodes2);
            rootNode.ExpandAll();
            rootNode.Checked = true;

        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            radTreeView1.Filter = textBox1.Text;

            if(radTreeView1.TopNode != null)
                radTreeView1.TopNode.ExpandAll();
        }
    }
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
2 comments
ADMIN
Hristo
Posted on: 28 Dec 2018 06:23
Hi Martin,

The issue is fixed in the R1 2017 SP1 (version 2017.1.221): https://www.telerik.com/support/whats-new/winforms/release-history/ui-for-winforms-r1-2017-sp1-(version-2017-1-221). It appears that you may have hit another known issue which is also currently fixed: FIX. RadTreeView - filtering doesn't show the correct results - version 2018.3.1016. In case you keep experiencing the issue please file a new bug report with steps how it can be reproduced.

Regards,
Hristo
Martin
Posted on: 27 Dec 2018 14:43
Is this bug fixed already? I've the same problem with the tree in NON-TriStateMode.