Unplanned
Last Updated: 08 Jul 2024 10:18 by ADMIN
Created by: Dev
Comments: 1
Category: TreeView
Type: Bug Report
0

In this particular case, the control is populated with 100 000. When all items are selected and we click on a single note all other items will be de-selected. This operation takes more time than expected. The de-selection process must be improved.

Unplanned
Last Updated: 29 Mar 2023 11:33 by ADMIN

Use the following code snippet and compare the filtering performance when using bound and unbound mode:

         public RadForm1()
        {
            InitializeComponent(); 

            this.radTextBox1.TextChanged += this.RadTextBox1_TextChanged;
             this.radTextBox2.TextChanged += this.RadTextBox2_TextChanged;
            List<Data> list = new List<Data>();
            this.radTreeView1.BeginUpdate();
            for (int i = 0; i < 100000; i++)
            {
                list.Add(new Data()
                {
                    Id = i,
                    Name = "MyData_"+i,
                    ParentId = -1
                }) ;

                this.radTreeView1.Nodes.Add("MyData_"+i);
            }
            this.radTreeView1.EndUpdate();
            this.radTreeView2.DisplayMember = "Name";
            this.radTreeView2.ParentMember = "ParentId";
            this.radTreeView2.DataSource = list; 
        }

         private void RadTextBox2_TextChanged(object sender, EventArgs e)
         {
               this.radTreeView2.Filter = this.radTextBox2.Text;
         } 
        private void RadTextBox1_TextChanged(object sender, EventArgs e)
        {
            this.radTreeView1.Filter = this.radTextBox1.Text;
        }
    }

    public class Data
    {
        public int Id { get; set; }
        public string Name { get; set; } 
        public int ParentId { get; set; }
    }

Expected behavior: the performance in bound and unbound mode should be quite similar

Actual behavior: the performance is much slower in bound mode

Unplanned
Last Updated: 30 Aug 2022 06:04 by Massimo

Steps to reproduce the issue:

1. Run the example app.
2. Click undo (the last item is removed).
3. Click redo (the last item should be added to the Treeview, it does not)
If I run the application and click undo twice and then redo twice, the things work. The Treeview is not updated if I add and remove the same element instance to the binding list.

Workaround: rebind the treeview after redo or create a new instance of the Element class with the same name and id.

Unplanned
Last Updated: 04 Jun 2020 09:51 by ADMIN
Please refer to the attached gif file for better illustration.
Unplanned
Last Updated: 06 May 2020 07:24 by ADMIN

Add a RadTreeView and fill it with nodes so that a vertical scrollbar is shown.

The RadTreeView.TopNode property indicates that it is expected to return the RadTreeNode which visual node element is the first visible one in the current view. But it always return the first data node in RadTreeView no matter which node is currently visible at the top. This is because it consider the RadTreeNode.Visible property. 

Workaround:

            TreeNodeElement neFirstVisible = this.radTreeView1.TreeViewElement.ViewElement.Children[0] as TreeNodeElement;
            RadMessageBox.Show("TopNode = " + neFirstVisible.Data.Text);

Unplanned
Last Updated: 30 Jan 2020 17:06 by ADMIN
Created by: Uladzislau
Comments: 1
Category: TreeView
Type: Bug Report
0

Add a CodedUI test which records expanding a node in RadTreeView. Run the CodedUI test and you will see that the TestMethod throws the following exception:

"Microsoft.VisualStudio.TestTools.Extension.UITestControlNotFoundException: The playback failed to find the control with given search properties."

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;
        }
Unplanned
Last Updated: 30 Aug 2018 13:25 by ADMIN
Workaround: Expand and collapse the nodes so that they are synchronized
this.radTreeView1.ExpandAll();
this.radTreeView1.CollapseAll();
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);


}
Unplanned
Last Updated: 06 Feb 2017 12:00 by ADMIN
Please refer to the attached gif file and sample project. The screen tip position is not the same each time. Hence, the issue may not be reproducible every time.

Workaround: use the TooltiptextNeeded event.
Unplanned
Last Updated: 16 Sep 2016 14:22 by ADMIN
Workaround:

raise a flag before the delete operation and cancel the SelectedNodeChanging 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.
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);
        }
    }
}


Unplanned
Last Updated: 15 Aug 2017 10:02 by ADMIN
ADMIN
Created by: Ralitsa
Comments: 0
Category: TreeView
Type: Feature Request
1

			
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);
}
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: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: 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: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
1 2