Declined
Last Updated: 09 Jul 2014 08:07 by ADMIN
Created by: Bryan
Comments: 1
Category: TreeView
Type: Bug Report
0
it appears to work okay on android, but I can't use it from an ipad
Completed
Last Updated: 06 Nov 2014 09:04 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: TreeView
Type: Bug Report
0
To reproduce: add a hierarchical RadTreeView with several levels. Use the  RadTreeNode.Expanded property in order to expand a child node from the bottom levels. Ensure that all parent nodes up to the top are expanded as well. When you run the application, the vertical scroll bar is not displayed.

Sub New()
    InitializeComponent()
    Me.Size = New Size(234, 188)
    Dim dt As New DataTable
    dt.Columns.Add("Id", GetType(String))
    dt.Columns.Add("ParentId", GetType(String))
    dt.Columns.Add("Name", GetType(String))

    Dim uniqueId As String = Guid.NewGuid().ToString()
    dt.Rows.Add(uniqueId, Nothing, "Node.1")
    For index = 2 To 5
        Dim subUniqueId As String = Guid.NewGuid().ToString()
        dt.Rows.Add(subUniqueId, uniqueId, "SubNode.1." & index)
        If index Mod 2 = 0 Then
            For index2 = 6 * index To 6 * index + 5
                Dim subSubUniqueId As String = Guid.NewGuid().ToString()
                dt.Rows.Add(subSubUniqueId, subUniqueId, "SubSubNode.1." & index & "." & index2)
                For index3 = 12 * index To 12 * index + 3
                    Dim subSubSubUniqueId As String = Guid.NewGuid().ToString()
                    dt.Rows.Add(subSubSubUniqueId, subSubUniqueId, "SubSubSubNode.1." & index & "." & index2 & "." & index3)
                Next
            Next
        End If
    Next

    Me.RadTreeView1.DataSource = dt
    Me.RadTreeView1.DisplayMember = "Name"
    Me.RadTreeView1.ValueMember = "Id"
    Me.RadTreeView1.RelationBindings.Add(New RelationBinding(dt, "Name", "ParentId", "Id", "Id"))

End Sub

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Dim nodeTextToExpand = "SubSubNode.1.4.27"
    Dim nodeToExpand = Me.RadTreeView1.GetNodeByName(nodeTextToExpand)
    If nodeToExpand IsNot Nothing Then
        Expand(nodeToExpand)
    End If
End Sub

Private Sub Expand(nodeToExpand As RadTreeNode)
    nodeToExpand.Expanded = True
    If nodeToExpand.Parent IsNot Nothing Then
        Expand(nodeToExpand.Parent)
    End If
End Sub

Workaround: start expanding the nodes from the top most level to the bottom most level: 
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Dim nodeTextToExpand = "SubSubNode.1.4.27"
    Dim nodeToExpand = Me.RadTreeView1.GetNodeByName(nodeTextToExpand)
    If nodeToExpand IsNot Nothing Then
        Expand(nodeToExpand)
    End If

    While (nodes.Count > 0)
        nodes.Pop().Expanded = True
    End While
End Sub

Dim nodes As New Stack(Of RadTreeNode)
Private Sub Expand(nodeToExpand As RadTreeNode)       
    nodes.Push(nodeToExpand)
    If nodeToExpand.Parent IsNot Nothing Then
        Expand(nodeToExpand.Parent)
    End If
End Sub
Completed
Last Updated: 09 Oct 2014 11:57 by ADMIN
To reproduce use the following function to reset the data source of the treeview
public void LoadObjects()
{
    radBreadCrumb1.DefaultTreeView = null;

    tvObjects.DataSource = null;
    
    tvObjects.DataSource = GetTable();
    tvObjects.DisplayMember = "Name";
    tvObjects.ValueMember = "Name";
    
    radBreadCrumb1.DefaultTreeView = tvObjects;
}

Workaround:
public void LoadObjects()
{
    radBreadCrumb1.DefaultTreeView = null;

    MethodInfo mi = typeof(RadBreadCrumb).GetMethod("value_Selected", BindingFlags.Instance | BindingFlags.NonPublic);
    Delegate delegateToRemove = Delegate.CreateDelegate(typeof(RadTreeView.RadTreeViewEventHandler), this.radBreadCrumb1, mi);

    this.tvObjects.TreeViewElement.SelectedNodeChanged -= (RadTreeView.RadTreeViewEventHandler)delegateToRemove;

    mi = typeof(RadBreadCrumb).GetMethod("value_NodeExpand", BindingFlags.Instance | BindingFlags.NonPublic);
    delegateToRemove = Delegate.CreateDelegate(typeof(RadTreeView.TreeViewEventHandler), this.radBreadCrumb1, mi);

    this.tvObjects.TreeViewElement.NodeExpandedChanged -= (RadTreeView.TreeViewEventHandler)delegateToRemove;
 
    tvObjects.DataSource = null;
    
    tvObjects.DataSource = GetTable();
    tvObjects.DisplayMember = "Name";
    tvObjects.ValueMember = "Name";
    
    radBreadCrumb1.DefaultTreeView = tvObjects;
}
Completed
Last Updated: 20 Oct 2014 14:20 by ADMIN
To reproduce: 
1.Add a RadTreeView and four RadButton controls.
2.Use the following code snippet:

private Random random = new Random();

public Form1()
{
    InitializeComponent();

    radTreeView1.AutoSize = true;
    radTreeView1.TreeViewElement.HorizontalScrollState = ScrollState.AlwaysHide ;
    radTreeView1.TreeViewElement.DrawBorder = false;
}

private string NextText()
{
    char[] letters = new char[random.Next(4, 11)];
    for (int i = 0; i < letters.Length; ++i)
    {
        letters[i] = (char)random.Next('a', 'z' + 1);
    }
    letters[0] = char.ToUpper(letters[0]);
    return new string(letters);
}

private RadTreeNodeCollection GetRandomNodeCollection()
{
    if (radTreeView1.Nodes.Count == 0)
    {
        return radTreeView1.Nodes;
    }

    int depth = random.Next(MaxDepth(radTreeView1.Nodes));

    var source = radTreeView1.Nodes;
    while ((depth--) >= 0 && source.Count > 0)
    {
        source = source[random.Next(source.Count)].Nodes;
    }

    return source;
}

private static int MaxDepth(RadTreeNodeCollection nodes, int currentDepth = 0)
{
    if (nodes.Count == 0)
    {
        return currentDepth;
    }

    int max = -1;

    foreach (var n in nodes)
    {
        max = Math.Max(MaxDepth(n.Nodes, currentDepth + 1), max);
    }

    return max;
}

private void UpdateTree(bool clearNodes)
{
    radTreeView1.BeginUpdate();
    if (clearNodes)
    {
        radTreeView1.Nodes.Clear();   
    }
    else
    {
        bool makeRoot = false;

        int count = random.Next(10, 50);
        for (; count > 0; --count)
        {
            makeRoot = random.NextDouble() < 0.23456789;
            var nodes = makeRoot
                        ? radTreeView1.Nodes
                        : GetRandomNodeCollection();
            
            nodes.Add(NextText());
        }
    }
    radTreeView1.EndUpdate();
    radTreeView1.ExpandAll();
}

private void radButton1_Click(object sender, EventArgs e)
{
    UpdateTree(false);
}

private void radButton2_Click(object sender, EventArgs e)
{
    UpdateTree(true);
}

private void radButton3_Click(object sender, EventArgs e)
{
    radTreeView1.ExpandAll();
}

private void radButton4_Click(object sender, EventArgs e)
{
    radTreeView1.CollapseAll();
}


Workaround: instead of clearing nodes, remove one by one:

//radTreeView1.Nodes.Clear();
while (radTreeView1.Nodes.Count > 0)
{
    radTreeView1.Nodes.Last().Remove();
}
Completed
Last Updated: 20 Oct 2014 14:29 by ADMIN
Workaround: use the NodeFormatting event to set the NodeElement.ExpanderElement.Padding to new Padding(1, 0, 0, 0)
Declined
Last Updated: 09 Oct 2014 10:49 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 1
Category: TreeView
Type: Bug Report
0
To reproduces: add a RadTreeView and set up Object-relational hierarchy. Use the following code:

NorthwindEntities context = new NorthwindEntities();

public Form1()
{
    InitializeComponent();

    context.Categories.Load();
    context.Products.Load();

    this.radTreeView1.DataSource = context.Categories.Local.ToBindingList();
    this.radTreeView1.DisplayMember = "CategoryName\\ProductName";
    this.radTreeView1.ChildMember = "Categories\\Products";
}

private void radButton1_Click(object sender, EventArgs e)
{
    this.radTreeView1.ChildMember = "Products\\Categories";
    this.radTreeView1.DisplayMember = "ProductName\\CategoryName"; 
    this.radTreeView1.DataSource = context.Products.Local.ToBindingList();
}

When you click the RadButton, NullReferenceException occurs.

Resolution: Add more descriptive exception message. 
Completed
Last Updated: 29 Sep 2014 08:25 by ADMIN
To reproduce: 
1. Add a RadTreeView and populate it with nodes at design time.
2. Use the following code snippet:

Me.RadTreeView1.AllowDefaultContextMenu = True
Me.RadTreeView1.RightToLeft = Windows.Forms.RightToLeft.Yes

When you run the application and right click over a node, the context menu is not in RTL mode.

Workaround: use the ContextMenuOpening event and set the TreeViewDefaultContextMenu.RightToLeft property to Yes.

Private Sub RadTreeView1_ContextMenuOpening(sender As Object, e As TreeViewContextMenuOpeningEventArgs) _
    Handles RadTreeView1.ContextMenuOpening
    Dim defaultMenu As TreeViewDefaultContextMenu = TryCast(e.Menu, TreeViewDefaultContextMenu)
    If defaultMenu IsNot Nothing Then
        defaultMenu.DropDown.RightToLeft = Windows.Forms.RightToLeft.Yes
    End If
End Sub
Completed
Last Updated: 09 Oct 2014 11:20 by ADMIN
If you set the RadBreadCrumb.DefaultTreeView property to null, all items in the RadBreadCrumb should be cleared. Additionally, the subscription to the SelectedNodeChanged remains although the associated tree view is set to null. Afterwards, if you change the selected node, a NullReferenceException occurs.
Completed
Last Updated: 18 Nov 2014 06:26 by ADMIN
Unplanned
Last Updated: 30 Mar 2016 13:34 by ADMIN
Select Demo application >> "Tree View" -> "Drag & Drop". Focus on the left treeview.
1. Click on the node "Drafts";
2. Press Shift button and click on the "Outbox" node;
3. Release shift button;
4. Press left mouse button on the "Outbox" node and start dragging;
5. Drop selected nodes after node "Large Mail".

You can see that order of nodes was changed.
Before: "Drafts", "Inbox" and "Outbox"
After: "Outbox", "Drafts" and "Inbox"

Possible workaround: http://www.telerik.com/forums/nodes-order-after-drag-drop#5bbz6cBDEUeHLyLU5zkfDQ
Completed
Last Updated: 14 Nov 2014 13:13 by ADMIN
Completed
Last Updated: 05 Nov 2014 15:33 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: TreeView
Type: Bug Report
0
To reproduce: 
1. Run Demo application >> TreeView >> Drag & Drop.
2. Change the theme to Windows7 and start dragging a node.

The drop hint is missing.

Workaround: apply the theme in the Form.Load event after getting the TreeViewElement.ItemDropHint property coming from the ControlDefault theme.

RadImageShape hint;

private void Form1_Load(object sender, EventArgs e)
{
    hint = this.radTreeView1.TreeViewElement.ItemDropHint;
    this.radTreeView1.ThemeName = "Windows7";
    this.radTreeView1.TreeViewElement.ItemDropHint = hint;
}
Completed
Last Updated: 29 Jan 2015 15:53 by ADMIN
Completed
Last Updated: 29 Jan 2015 16:03 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: TreeView
Type: Bug Report
0
Workaround:

class CustomDragDropService : TreeViewDragDropService
{
    public CustomDragDropService(RadTreeViewElement owner) : base(owner)
    {
        
    }

    protected override void SetHintWindowPosition(Point mousePt)
    {
    }
}

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

    protected override TreeViewDragDropService CreateDragDropService()
    {
        return new CustomDragDropService(this);
    }
}

class CustomTreeView : RadTreeView
{
    protected override RadTreeViewElement CreateTreeViewElement()
    {
        return new CustomTreeViewElement();
    }

    public override string ThemeClassName
    {
        get
        {
            return typeof(RadTreeView).FullName;
        }
    }
}
Unplanned
Last Updated: 08 Apr 2016 09:45 by ADMIN
Workaround:

private void radTreeView1_NodeFormatting(object sender, Telerik.WinControls.UI.TreeNodeFormattingEventArgs e)
        {
            e.NodeElement.UseDefaultDisabledPaint = true;
        }
Unplanned
Last Updated: 30 Mar 2016 13:36 by ADMIN
To reproduce:

1. Add a RadTreeView with several nodes
2. Subscribe to the EditorRequired event and specify the editor to TreeViewTextBoxEditor where its Multiline property is set to true.
3. Select a node and press F2. The editor is activated. However, when you enter some text and press Ctrl+Enter, the editor is closed. The expected behavior is that a new line is inserted.

Workaround:

private void radTreeView1_EditorRequired(object sender, TreeNodeEditorRequiredEventArgs e)
{
    CustomTreeViewTextBoxEditor editor = new CustomTreeViewTextBoxEditor();
    editor.Multiline = true;
    e.Editor = editor;
}

public class CustomTreeViewTextBoxEditor : TreeViewTextBoxEditor
{
    protected override void OnKeyDown(KeyEventArgs e)
    {
        if (e.KeyCode == Keys.Enter &&
            e.Modifiers == Keys.Control &&
            this.Multiline)
        {
            return;
        }
        base.OnKeyDown(e);
    }
}
Unplanned
Last Updated: 30 Mar 2016 13:38 by ADMIN
To reproduce:
Bind the tree to the following structure:
public class DeskSites
{
    public string DeskSiteName { get; set; }

    public Channels channels { get; set; }
}

public class Channels : List<Channel>
{
    
}

public class Channel
{
    public string ChannelName { get; set; }

    public FileSets fileSets { get; set; }
}

public class FileSets : List<FileSet>
{
   
}

public class FileSet
{
    public string FileSetName { get; set; }
}
Workaround:
Use the the generic class instead of the inherited one:
public class DeskSites
{
    public string DeskSiteName { get; set; }

    public List<Channel> channels { get; set; }
}

Unplanned
Last Updated: 30 Mar 2016 13:39 by ADMIN
To reproduce: 
1. Drag and drop RadTreeView on the form. 
2. Set the Dock property to true
3. Add 3 or more nodes with long names 
4. Resize the form to minimum size and you will notice that the spacing between characters is changed. 

Workaround: 
If FontSize of nodes is bigger than 13, you can subscribe to the NodeFormatting event and set the AutoEllipsis property to false: 
Font font = new Font("Segoe UI", 13f, FontStyle.Regular);
void radTreeView1_NodeFormatting(object sender, Telerik.WinControls.UI.TreeNodeFormattingEventArgs e)
{
    e.NodeElement.ContentElement.Font = font;
    e.NodeElement.ContentElement.AutoEllipsis = false;
}

If font size is smaller, you need to set the MinSize property too: 
Font font = new Font("Segoe UI", 12f, FontStyle.Regular);
void radTreeView1_NodeFormatting(object sender, Telerik.WinControls.UI.TreeNodeFormattingEventArgs e)
{
    e.NodeElement.ContentElement.Font = font;     
    e.NodeElement.ContentElement.MinSize = new System.Drawing.Size(500, 18);
}
Completed
Last Updated: 30 Jun 2015 08:28 by ADMIN
To reproduce:

public Form1()
{
    InitializeComponent();

    this.radTreeView1.AllowDragDrop = true;
    this.radTreeView2.AllowDragDrop = true;
    for (int i = 0; i < 5; i++)
    {
        this.radTreeView1.Nodes.Add("Node1." + i);
        this.radTreeView2.Nodes.Add("Node2." + i);
    }
    this.radTreeView1.ScreenTipNeeded += radTreeView1_ScreenTipNeeded;
    this.radTreeView2.ScreenTipNeeded += radTreeView1_ScreenTipNeeded;
}

RadOffice2007ScreenTipElement _screenTip = new RadOffice2007ScreenTipElement();

private void radTreeView1_ScreenTipNeeded(object sender, Telerik.WinControls.ScreenTipNeededEventArgs e)
{
    _screenTip.CaptionLabel.Text = "Caption";
    _screenTip.MainTextLabel.Text = "text";
    _screenTip.AutoSize = true;
    e.Delay = 2000;
    e.Item.ScreenTip = _screenTip;
}

Steps:
1. Drag a node from the first RadTreeView to the other while the screen-tip is shown for the dragged node.
2. When the screen-tip is about to be hidden, the error occurs.

Workaround:

private void radTreeView1_DragStarting(object sender, RadTreeViewDragCancelEventArgs e)
{
    if (_screenTip.IsElementVisible)
    {
        this.radTreeView1.Behavior.HideScreenTip();
    }
   
}