Completed
Last Updated: 16 Apr 2018 11:57 by Dimitar
Completed
Last Updated: 12 Apr 2012 04:21 by Svetlin
The checked state of parent node is incorrect when TriStateMode is enabled and it has a child node with no check type.
Declined
Last Updated: 27 Aug 2021 09:40 by ADMIN

Please run the attached sample project and follow the steps in the attached gif file. You will notice that the nodes are displayed multiple times.

Workaround: it seems that if the BeginUpdate/EndUpdate methods are not used in the PerformNodeMove methods, the issue is not reproducible

Completed
Last Updated: 05 Jun 2014 07:08 by Svetlin
When the RadTreeView is disabled, nodes text is rendered as bold text.
Unplanned
Last Updated: 30 Mar 2016 13:29 by Svetlin
Copy and paste in RadTreeView does not copies all properties of RadTreeNode.
Completed
Last Updated: 05 Jun 2014 07:08 by Svetlin
The SelectedNodes collection is not cleared, when the clear all nodes in single selection mode.
Completed
Last Updated: 05 Jun 2014 07:08 by Svetlin
The node find methods of RadTreeView should not perform over the inernal RootTreeNode.
Completed
Last Updated: 28 Aug 2019 11:36 by ADMIN
Release R3 2019
Created by: Kun
Comments: 1
Category: TreeView
Type: Bug Report
2

Hello,

I use radbreadcrumb as a group path explorer in my software. 

I associate it with a treeview. Please see the attache photos.

When I select a treeviewitem which has too much parent levels, the radbreadcrumb can not display the path completely.

I've tried autoscrollmargin and autoscrollminsize. No luck. Because my radbreadcrumb is in a splitcontainerpanel, the display size is changeable.

I expect a custom function can act like Windows Explorer (see the last attach photo). When there is no enough display space, only the last levels are shown.

 

PS. I've integrated the telerik solution from this post. And it works great. 

https://www.telerik.com/forums/getting-breadcrumb-to-act-like-windows-explorer-breadcrumb

 

Thank you by advance.

Kun

 

Completed
Last Updated: 27 Sep 2018 09:23 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 2
Category: TreeView
Type: Bug Report
2
To reproduce: please run the attached sample project and follow the steps in the attached sample gif file.

Workaround: instead of filtering the nodes, you can manipulate the RadTreeNode.Visible property considering the filter criteria and whether the node contains a child that matches the filter. 
        public RadForm1()
        {
            InitializeComponent();

            this.radTreeView1.ShowLines = true; 
        }

        private void FilterNode(RadTreeNode node)
        {
            bool atLeastOneChildMatches = false;
            ChildNodeContains(this.radTextBox1.Text.ToLower(), node.Nodes, ref atLeastOneChildMatches);
            if (node.Text.ToLower().Contains(this.radTextBox1.Text.ToLower()) || atLeastOneChildMatches)
            {
                node.Visible = true;
            }
            else
            {
                node.Visible = false;
            }
        }

        private void ChildNodeContains(string filterCritria, RadTreeNodeCollection nodes, ref bool atLeastOneChildMatches)
        {
            foreach (RadTreeNode node in nodes)
            {
                if (node.Text.ToLower().Contains(filterCritria))
                {
                    atLeastOneChildMatches = true;
                    return;
                }
                if (atLeastOneChildMatches == false && node.Nodes.Count > 0)
                {
                    ChildNodeContains(filterCritria, node.Nodes, ref atLeastOneChildMatches);
                }
            }
        }

        private void radTextBox1_TextChanged(object sender, EventArgs e)
        {
            PerformFilter(this.radTreeView1.Nodes);
        }

        private void PerformFilter(RadTreeNodeCollection nodes)
        {
            foreach (RadTreeNode node in nodes)
            {
                FilterNode(node);
                if (node.Nodes.Count > 0)
                {
                    PerformFilter(node.Nodes);
                }
            }
        }
Completed
Last Updated: 25 Jul 2011 04:22 by Svetlin
The SelectedNodeChanged event in RadTreeView is fired before the SelectedNodes collection is updated.
Completed
Last Updated: 27 Sep 2018 09:55 by Dimitar
To reproduce:

        public RadForm1()
        {
            InitializeComponent();

            BindingList<Item> items = new BindingList<Item>();
            items.Add(new Item(0,"Root", CheckState.Checked,-1));
            for (int i = 1; i < 5; i++)
            {
                items.Add(new Item(i, "Node" + i, CheckState.Checked,0));
            }
          
            this.radTreeView1.CheckBoxes = true;
            this.radTreeView1.DisplayMember = "Name";
            this.radTreeView1.ChildMember = "Id";
            this.radTreeView1.ParentMember = "ParentId";
            this.radTreeView1.CheckedMember = "IsActive";
            this.radTreeView1.AutoCheckChildNodes = true;
            this.radTreeView1.TriStateMode = true;
            this.radTreeView1.DataSource = items;
            this.radTreeView1.ExpandAll();
        }

        public class Item
        {
            public int Id { get; set; }

            public string Name { get; set; }

            public CheckState IsActive { get; set; }

            public int ParentId { get; set; }

            public Item(int id, string name, CheckState isActive, int parentId)
            {
                this.Id = id;
                this.Name = name;
                this.IsActive = isActive;
                this.ParentId = parentId;
            }
        }

Workaround: implement a TypeConverter that can handle converting from/to System.Windows.Forms.CheckState. A sample implementation for creating a custom TypeConverter is demonstrated in the following help article: https://docs.telerik.com/devtools/winforms/treeview/data-binding/togglestateconverter
Completed
Last Updated: 10 May 2013 11:19 by Jesse Dyck
The event is fired then drag and drop is performed in unbound mode but not when in bound mode
Completed
Last Updated: 18 Feb 2013 02:16 by ADMIN
FIX. RadTreeView - CreateNode event is not fired when adding a node from the New menu item in the context menu

Workaround: Use the NodeAdding/NodeAdded events.
Completed
Last Updated: 01 Apr 2019 07:30 by ADMIN
At the moment the filter predicate is called only for the root nodes. A possible workaround is to recursively apply the filter logic for the child nodes as well.
Workaround:
private void Button1_Click(object sender, EventArgs e)
{
    this.radTreeView1.TreeViewElement.FilterPredicate = this.FilterNode;
    this.radTreeView1.Filter = "Custom";
}

private bool FilterNode(RadTreeNode node)
{
    Console.WriteLine(node.Text);
    if (node.Text.Contains("Child: 3"))
    {
        return true;
    }

    Stack<RadTreeNode> children = new Stack<RadTreeNode>();
    if (node.Nodes.Count > 0)
    {
        children.Push(node);
        while (children.Count > 0)
        {
            RadTreeNode current = children.Pop();
            foreach (RadTreeNode child in current.Nodes)
            {
                if (child.Text.Contains("Child: 3"))
                {
                    return true;
                }

                children.Push(child);
            }
        }
    }

    return false;
}
Unplanned
Last Updated: 24 Aug 2018 12:59 by ADMIN
Workaround:
private void radButton1_Click(object sender, EventArgs e)
{
    var allNodes = radTreeView1.TreeViewElement.GetNodes().ToList();

    int row = 0;
  
    Workbook workbook = new Workbook();
    Worksheet newWorksheet = workbook.Worksheets.Add();

    foreach (var item in allNodes)
    {

        CellSelection cell = newWorksheet.Cells[row, item.Level];
        cell.SetValue(item.Text);

        cell = newWorksheet.Cells[row++, 2];
        cell.SetValue(item.Checked);

    }

    var formatProvider = new XlsxFormatProvider();


    var bytes = formatProvider.Export(workbook);
    File.WriteAllBytes(@"D:\Test.xlsx", bytes);


}
Completed
Last Updated: 13 Feb 2014 13:20 by ADMIN
Workaround:
RadTreeView1.TreeViewElement.TreeNodeProvider.Reset()
Declined
Last Updated: 06 Nov 2018 12:29 by ADMIN
To reproduce: please refer to the attached sample project and try to reorder a node. You will notice that the message box is not rendered properly.

        //case 2
        private void DragDropService_PreviewDragDrop(object sender, RadDropEventArgs e)
        {
             e.Handled = true;
            RadMessageBox.Show(this, "Showing a messagebox under dragending doesn't work correctly.");
        }

        //case 1
        private void radTreeView1_DragEnding(object sender, Telerik.WinControls.UI.RadTreeViewDragCancelEventArgs e)
        {
            //e.Cancel = true;
            //RadMessageBox.Show(this, "Showing a messagebox under dragending doesn't work correctly.");
        }

Workaround: subscribe to the TreeViewElement.DragDropService.PreviewDragDrop and set the Handled argument to true if you want to cancel the drop operation. Then, handle the TreeViewElement.DragDropService.Stopped event and show the desired message.

        public Form1()
        {
            InitializeComponent();
            
            this.radTreeView1.TreeViewElement.DragDropService.PreviewDragDrop += DragDropService_PreviewDragDrop;
            this.radTreeView1.TreeViewElement.DragDropService.Stopped+=DragDropService_Stopped;
        }

        private void DragDropService_Stopped(object sender, EventArgs e)
        {
            
            RadMessageBox.Show(this, "Showing a messagebox under dragending doesn't work correctly.");
        }
 
        private void DragDropService_PreviewDragDrop(object sender, RadDropEventArgs e)
        {
            e.Handled = true;
        }
Completed
Last Updated: 31 Oct 2018 12:27 by Dimitar
To reproduce:

Run the attached application. Drag Node 2 to after Node 4 while holding down the Alt key. Note that the Node 2 copy is inserted before Node 4.

When Node 2 is dragged to after Node 4 without holding down the Alt key, Node 2 is correctly moved to after Node 4.

Workaround: you can modify the TreeViewDragDropService and control at what position exactly to be inserted the dragged node:

https://docs.telerik.com/devtools/winforms/treeview/drag-and-drop/modify-the-dragdropservice-behavior
https://docs.telerik.com/devtools/winforms/treeview/drag-and-drop/drag-and-drop-in-bound-mode
Unplanned
Last Updated: 16 May 2019 05:06 by ADMIN
To reproduce: add a RadTreeView and a RadBreadCrumb and apply the MaterialTeal theme. Refer to the attached screenshot illustrating the wrong font of the selected item.

Workaround:

    public partial class RadForm1 : Telerik.WinControls.UI.RadForm
    {
        public RadForm1()
        {
            InitializeComponent(); 

            ThemeResolutionService.ApplicationThemeName = "MaterialTeal";

            this.radTreeView1.NodeFormatting += radTreeView1_NodeFormatting;
            this.radTreeView1.SelectedNodeChanged += radTreeView1_SelectedNodeChanged; 
        }
 
        private void UpdateFont()
        {
            foreach (RadSplitButtonElement item in this.radBreadCrumb1.BreadCrumbElement.Items)
            {
                foreach (RadMenuItem menuItem in item.Items)
                {
                    if (this.radTreeView1.SelectedNode != null && menuItem.Text == this.radTreeView1.SelectedNode.Text)
                    {
                        menuItem.Font = new Font(f.FontFamily,f.Size, FontStyle.Bold);
                    }
                }
            }
        }
        
        private void radTreeView1_SelectedNodeChanged(object sender, Telerik.WinControls.UI.RadTreeViewEventArgs e)
        {
            UpdateFont();
        }

        Font f = null;

        private void radTreeView1_NodeFormatting(object sender, Telerik.WinControls.UI.TreeNodeFormattingEventArgs e)
        {
            f = e.NodeElement.ContentElement.Font;
        }
Completed
Last Updated: 27 Mar 2019 14:47 by Dimitar

Hi there, through out our app we use the treeview everywhere - but we have had this issue where it crashes when someone right clicks on the treeview where there is no node. This crash happens on the "ContextMenuOpening" event when we try to use e.TreeElement. This is because, on the telerik side of things, the getter for that property is throwing a NullReferenceException (see attached screenshot)

 

I think this is happening because in your RadTreeViewCancelEventArgs.cs it is this:

        public RadTreeViewElement TreeElement
        {
            get { return node.TreeViewElement; }
        }

        public RadTreeView TreeView
        {
            get { return node.TreeView; }
        }

But since node == null, it throws the exception. It probably should check for null, and if node is null, return a null for those properties - so we can use null conditional operator to check stuff. We have a workaround but it is just lots of copy and paste of things.