Declined
Last Updated: 23 Mar 2017 06:33 by ADMIN
Please refer to the attached screenshot from the Demo application >> General Settings example.

Workaround: 

private void radTreeView1_NodeFormatting(object sender, TreeNodeFormattingEventArgs e)
{
    e.NodeElement.ExpanderElement.Margin = new Padding(2, 0, 0, 0);
}
Completed
Last Updated: 09 Feb 2017 11:29 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 2
Category: TreeView
Type: Bug Report
1
To reproduce:

this.radTreeView1.TriStateMode = true;

RadTreeNode sitesNode = radTreeView1.Nodes.Add("Sites", "Sites", "");
sitesNode.Expanded = true;

RadTreeNode siteNode = new RadTreeNode("A site");
sitesNode.Nodes.Add(siteNode);

RadTreeNode eNode = new RadTreeNode("Event Types");
siteNode.Nodes.Add(eNode);
siteNode.Expanded = true;
RadTreeNode dummy = new RadTreeNode("dummy");
eNode.Nodes.Add(dummy);
dummy.CheckState = ToggleState.On;

RadTreeNode dummy2 = new RadTreeNode("dummy2");
eNode.Nodes.Add(dummy2);
dummy2.CheckState = ToggleState.Off;

Please refer to the attached screenshot. 

Workaround: change the CheckState property after all nodes are added to RadTreeView.

this.radTreeView1.TriStateMode = true;

RadTreeNode sitesNode = radTreeView1.Nodes.Add("Sites", "Sites", "");
sitesNode.Expanded = true;

RadTreeNode siteNode = new RadTreeNode("A site");
sitesNode.Nodes.Add(siteNode);

RadTreeNode eNode = new RadTreeNode("Event Types");
siteNode.Nodes.Add(eNode);
siteNode.Expanded = true;
RadTreeNode dummy = new RadTreeNode("dummy");
eNode.Nodes.Add(dummy);


RadTreeNode dummy2 = new RadTreeNode("dummy2");
eNode.Nodes.Add(dummy2);

dummy2.CheckState = ToggleState.Off; 
dummy.CheckState = ToggleState.On;
Completed
Last Updated: 04 Jan 2017 14:34 by ADMIN
To reproduce: 

Add a RadTreeView and a RadBreadCrumb and two RadButtons on the form and populate the tree view with data. Use the following code snippet:

private void radButton1_Click(object sender, EventArgs e)
{
    this.radBreadCrumb1.DefaultTreeView = null;
}

Random rand = new Random();

private void radButton2_Click(object sender, EventArgs e)
{
    this.radTreeView1.DataSource = null;
    DataTable dt = new DataTable();
    dt.Columns.Add("Id");
    dt.Columns.Add("Name");
    for (int i = 0; i < 10; i++)
    {
        dt.Rows.Add(rand.Next(0, 20), "Node" + i);
    }
    this.radTreeView1.DataSource = dt;
    this.radTreeView1.DisplayMember = "Name";
    this.radTreeView1.ValueMember = "Id";

    this.radBreadCrumb1.DefaultTreeView = this.radTreeView1;
}

Select some node in RadTreeView, the RadBreadCrum is updated respectively. Then click the first button to detach RadTreeView from RadBreadCrumb. Click the second button to populate RadTreeView with new data and associated the RadBreadCrumb with RadTreeView again. As a result you will notice that the last selected node will be loaded.

Workaround: clear the selection in RadTreeView before associating the RadBreadCrumb with RadTreeView:

this.radTreeView1.ClearSelection();
this.radBreadCrumb1.DefaultTreeView = this.radTreeView1;
Completed
Last Updated: 03 Jan 2017 07:06 by ADMIN
To reproduce: 

1. Add a RadTreeView and a RadBreadCrumb. Associated the breadcrumb with the tree.
2. Select a node and use the following code:
this.radBreadCrumb1.DefaultTreeView.Nodes.Clear();

Workaround: set the RadBreadCrumb.DefaultTreeView property to null.
Completed
Last Updated: 30 Nov 2016 07:35 by ADMIN
Steps to reproduce: 
1. Add RadTreeView with few items 
2. Apply custom filtering 
3. In order to remove the custom filtering and return the default filtering, set the FilterPredicate to null. 
As a result, it is thrown an exception. 

Workaround: 
1. Save the default filter predicate before applying the custom filtering 
2. Clear filter descriptors and set the FilterPredicate property to stored default filter predicate

In the attachments can be found a sample application demonstrating the issue and the workaround 
Completed
Last Updated: 23 May 2019 13:19 by ADMIN
Release R2 2019 SP1 (LIB 2019.2.527)
To reproduce:
- Open the Property builder, add some nodes and disable them.
- There is no way to enable them at design time. 

Workaround. 
Disable the nodes at runtime.
Completed
Last Updated: 22 Aug 2016 14:23 by ADMIN
Please refer to the attached sample project and follow the steps: 

If you execute my code sample and try this sequence, you will see my problem:
1- start the application
2- select "test1" on the grid => you see "fonction XX of test1" in the treeview (that's correct)
3- select "test2" on the grid => you see "fonction XX of test2" in the treeview (that's correct)
4- expand all nodes in the treeview
5- uncheck "fonction 31 of test2" in the treeview
6- select "test1" on the grid => you have the error message. On the grid, we have "test1" selected and on the treeview we have "test2".
Note that the problem appears only when checking a node in the treeview on a second level. If you follow this procedure, you will have no problem :
1- restart the application
2- select "test1" on the grid => you see "fonction XX of test1" in the treeview (that's correct)
3- select "test2" on the grid => you see "fonction XX of test2" in the treeview (that's correct)
4- uncheck "fonction 30 of test2" in the treeview
5- select "test1" on the grid => you will have no error. On the grid, we have "test1" selected and on the treeview we have "test1".
6- select "test2" on the grid => you will have no error. On the grid, we have "test2" selected and on the treeview we have "test2" with "fonction 30 of test2" unchecked.

Workaround: in order to synchronize the current row in RadGridView is to change the RadTreeView.DataSource in the RadGridView.CurrentRowChanged event.
Completed
Last Updated: 02 Feb 2018 15:36 by ADMIN
To reproduce:

DataTable dt = new DataTable();
 
public Form1()
{
    InitializeComponent();

    dt.Columns.Add("Id", typeof(int));
    dt.Columns.Add("ParentID", typeof(int));
    dt.Columns.Add("NodeName", typeof(string));
    dt.Rows.Add(1, 0, "Category1");
    dt.Rows.Add(2, 1, "Category2");
    dt.Rows.Add(3, 0, "Category3");
    dt.Rows.Add(4, 3, "Category4");
    dt.Rows.Add(5, 3, "Category5");
    dt.Rows.Add(6, 3, "Category6");
    dt.Rows.Add(7, 6, "Category7");
    dt.Rows.Add(8, 6, "Category8"); 

    this.radTreeView1.DataSource = dt; 

    this.radTreeView1.DisplayMember = "NodeName";
    this.radTreeView1.ChildMember = "ID";
    this.radTreeView1.ParentMember = "ParentID";

    this.radTreeView1.ExpandAll();

    this.radTreeView1.AllowAdd = true;
    this.radTreeView1.AllowRemove = true;
    this.radTreeView1.AllowDefaultContextMenu = true;

    this.radLabel1.Text = "Number of rows: " + dt.Rows.Count;
    
    this.radTreeView1.NodeRemoved += radTreeView1_NodeRemoved;
}

private void radTreeView1_NodeRemoved(object sender, Telerik.WinControls.UI.RadTreeViewEventArgs e)
{
    this.radLabel1.Text = "Number of rows: " + dt.Rows.Count;
}

Workaround: perform the delete operation programmatically by modifying the default context menu:

 this.radTreeView1.ContextMenuOpening += radTreeView1_ContextMenuOpening;

private void radTreeView1_ContextMenuOpening(object sender, TreeViewContextMenuOpeningEventArgs e)
{
    foreach (RadMenuItem item in e.Menu.Items)
    {
        if (item.Text == "&Delete")
        {
            item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
        }
        else
        {
            item.Visibility = Telerik.WinControls.ElementVisibility.Visible;
        }
    }

    RadMenuItem removeItem = new RadMenuItem("Remove");
    e.Menu.Items.Add(removeItem);
    removeItem.Click += item_Click;
}

private void item_Click(object sender, EventArgs e)
{
    DeleteSubNodes(this.radTreeView1.SelectedNode);
    this.radLabel1.Text = "Number of rows: " + dt.Rows.Count;
}

private void DeleteSubNodes(Telerik.WinControls.UI.RadTreeNode node)
{
    if (node.Nodes.Count == 0)
    {
        dt.Rows.Remove(((DataRowView)node.DataBoundItem).Row);
    }
    else
    {
        foreach (RadTreeNode n in node.Nodes)
        {
            DeleteSubNodes(n);
        }
        dt.Rows.Remove(((DataRowView)node.DataBoundItem).Row);
    }
}
Unplanned
Last Updated: 16 Sep 2016 14:22 by ADMIN
Workaround:

raise a flag before the delete operation and cancel the SelectedIndexChanging event
Unplanned
Last Updated: 06 Jun 2016 10:19 by ADMIN
Use the attached project to reproduce.
- Check on of the nodes and then press Alt +T (do not move the mouse away from the node)

Workaround:
Set transparent fill and border to the TreeNodeElement disabled state in Visual Style Builder.
Completed
Last Updated: 10 Jun 2016 07:27 by ADMIN
To reproduce: select a node and click the button. Note: it may be necessary to perform this several times.

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

    private List<DataObject> GetDataList()
    {
        var ret = new List<DataObject>();

        ret.Add(new DataObject() { Node = "A", Parent = null });
        ret.Add(new DataObject() { Node = "B", Parent = "A" });
        ret.Add(new DataObject() { Node = "C", Parent = "B" });
        ret.Add(new DataObject() { Node = "D", Parent = "B" });

        return ret;
    }
    
    private void button1_Click(object sender, EventArgs e)
    {
        radTreeView1.Nodes.Clear(); 
        radTreeView1.DisplayMember = "Node";
        radTreeView1.ChildMember = "Node";
        radTreeView1.ParentMember = "Parent";
        radTreeView1.DataSource = GetDataList();
        radTreeView1.ExpandAll();
    }
}

public class DataObject
{
    public string Node { get; set; }

    public string Parent { get; set; }
}

Workaround: instead of clearing the nodes, set the DataSource property to null.
Unplanned
Last Updated: 06 May 2016 13:21 by ADMIN
Unplanned
Last Updated: 05 Apr 2016 12:54 by ADMIN
To reproduce:
- Open the attached project.
- Scroll to the right.
- Drag a node.
- The DropHint line is outside the window.
 
Workaround:
class CustomTreeView : RadTreeView
{
    //Replace the default element with the custom one
    protected override RadTreeViewElement CreateTreeViewElement()
    {
        return new CustomTreeViewElement();
    }
    //Enable theming for the control
    public override string ThemeClassName
    {
        get
        {
            return typeof(RadTreeView).FullName;
        }
    }
}
class CustomTreeViewElement : RadTreeViewElement
{
    //Enable themeing for the element
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(RadTreeViewElement);
        }
    }
    //Replace the default drag drop service with the custom one
    protected override TreeViewDragDropService CreateDragDropService()
    {
        return new MyDragDropService(this);
    }
}
class MyDragDropService : TreeViewDragDropService
{
    public MyDragDropService(RadTreeViewElement owner)
    : base(owner)
{ }
    protected override void UpdateHintPosition(Point mousePosition)
    {
        base.UpdateHintPosition(mousePosition);
        RadLayeredWindow dropHint =typeof(TreeViewDragDropService).GetField("dropHintWindow", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(this) as RadLayeredWindow;
        if (dropHint != null)
        {
            TreeNodeElement nodeElement = this.DropTarget as TreeNodeElement;
           
            dropHint.Location = new Point (nodeElement.ElementTree.Control.PointToScreen(Point.Empty).X, dropHint.Location.Y);
        }
    }
}


Completed
Last Updated: 05 May 2016 09:25 by ADMIN
To reproduce:

private void Form1_Load(object sender, EventArgs e)
{ 
    this.radTreeView1.Nodes.Add("Node1");
    this.radTreeView1.Nodes.Add("Node2");
    this.radTreeView1.Nodes.Add("Node3");
    this.radTreeView1.Nodes.Add("Node4");
    this.radTreeView1.Nodes.Add("Node5");
    this.radTreeView1.Nodes.Add("Node6");
    this.radTreeView1.Nodes["Node1"].Nodes.Add("Node11");
    this.radTreeView1.Nodes["Node1"].Nodes.Add("Node12");
    this.radTreeView1.Nodes["Node1"].Nodes.Add("Node13");
    this.radTreeView1.Nodes["Node1"].Nodes.Add("Node14");
    this.radTreeView1.Nodes["Node2"].Nodes.Add("Node21");
    this.radTreeView1.Nodes["Node2"].Nodes.Add("Node22");
    this.radTreeView1.Nodes["Node2"].Nodes.Add("Node23");
    this.radTreeView1.Nodes["Node2"].Nodes.Add("Node24");
    this.radTreeView1.Nodes["Node3"].Nodes.Add("Node31");
    this.radTreeView1.Nodes["Node3"].Nodes.Add("Node32");
    this.radTreeView1.Nodes["Node3"].Nodes.Add("Node33");
    this.radTreeView1.Nodes["Node3"].Nodes.Add("Node34");
    this.radTreeView1.Nodes["Node4"].Nodes.Add("Node41");
    this.radTreeView1.Nodes["Node4"].Nodes.Add("Node42");
    this.radTreeView1.Nodes["Node4"].Nodes.Add("Node43");
    this.radTreeView1.Nodes["Node4"].Nodes.Add("Node44");
    this.radTreeView1.Nodes["Node5"].Nodes.Add("Node51");
    this.radTreeView1.Nodes["Node5"].Nodes.Add("Node52");
    this.radTreeView1.Nodes["Node5"].Nodes.Add("Node53");
    this.radTreeView1.Nodes["Node5"].Nodes.Add("Node54");
    this.radTreeView1.Nodes["Node6"].Nodes.Add("Node61");
    this.radTreeView1.Nodes["Node6"].Nodes.Add("Node62");
    this.radTreeView1.Nodes["Node6"].Nodes.Add("Node63");
    this.radTreeView1.Nodes["Node6"].Nodes.Add("Node64");
}

Workaround: add the nodes in the form's constructor.

Second workaround:  Me.RadTreeView1.TreeViewElement.Update(Telerik.WinControls.UI.RadTreeViewElement.UpdateActions.Reset)
Completed
Last Updated: 08 Mar 2016 06:52 by ADMIN
To reproduce:
- Bind to object-relational data
- Add node via the context menu.
- The DataBoundItem in the NodeAdding and NodeAdded events is null.

Workaround:
- Add the node in the code behind:
private void RadTreeView1_NodeAdding(object sender, RadTreeViewCancelEventArgs e)
{
    e.Cancel = true;
    RadTreeNode node = radTreeView1.SelectedNode;
    if (node.Level == 0)
    {
        data.Add(new MyParentClass() { Text = "test" });
    }

}
Completed
Last Updated: 10 Feb 2016 13:13 by ADMIN
To reproduce:
1) Create a Windows Forms project.
2) Add a RadTreeView control.
3) Set the KeyboardSearchEnabled property to true.
4) Run the application and click in the tree (just to make sure it has the focus).
5) Using the keyboard, press a letter key.
6) Minimize the application.

The same exception occurs if there are no selected nodes.

Workaround:
class MyTreeView : RadTreeView
{
    protected override RadTreeViewElement CreateTreeViewElement()
    {
        return new MyTreeViewElement();
    }
    public override string ThemeClassName
    {
        get
        {
            return typeof(RadTreeView).FullName;
        }

        set
        {
            base.ThemeClassName = value;
        }
    }
}
class MyTreeViewElement : RadTreeViewElement
{
    protected override Type ThemeEffectiveType
    {
        get
        {
            return typeof(RadTreeViewElement);
        }
    }
    protected override RadTreeNode GetFirstMatch(string searchCriteria, RadTreeNodeCollection nodes)
    {
        if(this.SelectedNode == null && this.Items == null)
        {
            return null;
        }
        return base.GetFirstMatch(searchCriteria, nodes);
    }
}

Completed
Last Updated: 19 Jan 2016 10:45 by ADMIN
When you open the last node for edit programmatically, either an exception is thrown or the editor is not opened.

Steps to reproduce:

1. Drag a RadTreeView from Toolbox and drop it onto the form.
2. Set the size of RadTreeView at design time to Size(354, 248).
3. Add a RadButton.
4. Use the following code:
public Form1()
{
    InitializeComponent(); 
    radTreeView1.AllowEdit = true; 
    radTreeView1.Nodes.Add("Root");
    for (int i = 0; i < 20; i++)
    {
        radTreeView1.Nodes[0].Nodes.Add("Test" + i.ToString());
    }
}

private void radButton1_Click(object sender, EventArgs e)
{
    RadTreeNode node = new RadTreeNode("Demo" + radTreeView1.Nodes[0].Nodes.Count.ToString());
    radTreeView1.Nodes[0].Nodes.Add(node);
    node.BeginEdit();
}

5. Click the button.
6. Collapse the root node.
7. Click the button again.



Workaround:

        private void button1_Click(object sender, EventArgs e)
        {
            RadTreeNode node = new RadTreeNode("Demo" + radTreeView1.Nodes[0].Nodes.Count.ToString());
            radTreeView1.Nodes[0].Nodes.Add(node);
            this.radTreeView1.TreeViewElement.Update(RadTreeViewElement.UpdateActions.Reset);
            node.Parent.Expanded = true;
            ((MyTreeViewElement)this.radTreeView1.TreeViewElement).SuspendEndEdit = true;
            node.BeginEdit();
            ((MyTreeViewElement)this.radTreeView1.TreeViewElement).SuspendEndEdit = false;
        } 

    public class MyTreeView : RadTreeView
    {
        protected override RadTreeViewElement CreateTreeViewElement()
        {
            return new MyTreeViewElement();
        }

        public override string ThemeClassName
        {
            get
            {
                return typeof(RadTreeView).FullName;
            }
            set
            {
            }
        }
    }

    public class MyTreeViewElement : RadTreeViewElement
    {
        public bool SuspendEndEdit = false;

        protected override Type ThemeEffectiveType
        {
            get
            {
                return typeof(RadTreeViewElement);
            }
        }

        protected override bool EndEditCore(bool commitChanges)
        {
            if (SuspendEndEdit)
            {
                return false;
            }

            return base.EndEditCore(commitChanges);
        }
    }
Declined
Last Updated: 11 Nov 2015 15:05 by ADMIN
To reproduce:
public Form1()
{
    InitializeComponent(); 
    this.radTreeView1.NodesNeeded+=radTreeView1_NodesNeeded;
}

private void radTreeView1_NodesNeeded(object sender, Telerik.WinControls.UI.NodesNeededEventArgs e)
{
    Console.WriteLine("NodesNeeded"); 
}

As a result StackOverFlowException is thrown.

Workaround: Do not subscribe to the NodesNeeded event if the LazyMode property is set to false.
Completed
Last Updated: 22 Feb 2016 07:59 by ADMIN
To reproduce:

public Form1()
{
    InitializeComponent();
    this.radTreeView1.LazyMode = true; 
    this.radTreeView1.NodesNeeded+=radTreeView1_NodesNeeded;
}

private void radTreeView1_NodesNeeded(object sender, Telerik.WinControls.UI.NodesNeededEventArgs e)
{
    
}

Workaround: set the AllowArbitraryItemHeight property to true.
Completed
Last Updated: 05 Nov 2015 12:22 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: TreeView
Type: Bug Report
0
To reproduce:

public BlankTreeView()
{
    InitializeComponent();
    RadContextMenu menu = new RadContextMenu();
    RadMenuItem addItem = new RadMenuItem("Add");
    addItem.Click += addItem_Click;
    menu.Items.Add(addItem);
    this.radTreeView1.RadContextMenu = menu;
    
    BindingList<ParentObject> items = new BindingList<ParentObject>();
    for (int i = 0; i < 3; i++)
    {
        BindingList<ChildObject> subItems = new BindingList<ChildObject>();
        for (int j = 0; j < 10; j++)
        {
            subItems.Add(new ChildObject(j,"SubNode" + i + "." + j));
        }

        items.Add(new ParentObject(i ,"Node" + i,subItems));
    }

    this.radTreeView1.DataSource = items;
    this.radTreeView1.DisplayMember = "Title\\Description";
    this.radTreeView1.ChildMember = "ParentObject\\Children";
}

private void addItem_Click(object sender, EventArgs e)
{
    if (this.radTreeView1.SelectedNode != null)
    {
        if (this.radTreeView1.SelectedNode.Level == 0)
        {
            Random rand = new Random(); 
            ParentObject dataItem = this.radTreeView1.SelectedNode.DataBoundItem as ParentObject;
            if (dataItem != null)
            {
                dataItem.Children.Add(new ChildObject(rand.Next(0, 100),"New Node"));
            } 
        }
    }
}

public class ParentObject: INotifyPropertyChanged
{
    public event PropertyChangedEventHandler PropertyChanged;

    protected virtual void OnPropertyChanged(string propertyName)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }
    
    private int id;
    private string title;
    private BindingList<ChildObject> children;

    public int ID
    {
        get
        {
            return this.id;
        }
        set
        {
            this.id = value;
            OnPropertyChanged("ID");
        }
    }

    public string Title
    {
        get
        {
            return this.title;
        }
        set
        {
            this.title = value;
            OnPropertyChanged("Title");
        }
    }

    public BindingList<ChildObject> Children
    {
        get
        {
            return this.children;
        }
        set
        {
            this.children = value;
            OnPropertyChanged("Children");
        }
    }

    public ParentObject(int iD, string title, BindingList<ChildObject> children)
    {
        this.ID = iD;
        this.Title = title;
        this.Children = children;
    }
}

public class ChildObject: INotifyPropertyChanged
{ 
    public event PropertyChangedEventHandler PropertyChanged;

    private int id;
    private string description;

    public int ID
    {
        get
        {
            return this.id;
        }
        set
        {
            this.id = value;
            OnPropertyChanged("ID");
        }
    }

    public string Description
    {
        get
        {
            return this.description;
        }
        set
        {
            this.description = value;
            OnPropertyChanged("Description");
        }
    }

    public ChildObject(int iD, string description)
    {
        this.id = iD;
        this.description = description;
    }

    protected virtual void OnPropertyChanged(string propertyName)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}

Workaround: reset the TreeViewElement after adding the record:

radTreeView1.TreeViewElement.Update(RadTreeViewElement.UpdateActions.Reset);