To reproduce: Use the following code on an empty RadTreeView: this.TreeView.AddNodeByPath("General\\Billing\\February\\Report.txt"); You will see that the Report.txt node will be added to the Root node Workaround: Use the following method: private RadTreeNodeCollection AddNode(string path) { if (path == String.Empty) return this.TreeView.Nodes; string node = Path.GetFileName(path); RadTreeNodeCollection parent = AddNode(Path.GetDirectoryName(path)); if (parent.Contains(node)) return parent[node].Nodes; else return parent.Add(node).Nodes; }
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.
Currently we do not support binding to the ToggleState.Indeterminate state automatically because it would require a change in the behavior of the Checked property. If you use the CheckedMember, the ToggleState.Indeterminate state is represent like ToggleState.On. Workaround: Subscribe to the NodeFormatting and NodeCheckedChanged events: void radTreeView1_NodeFormatting(object sender, Telerik.WinControls.UI.TreeNodeFormattingEventArgs e) { Child child = e.Node.DataBoundItem as Child; if (child != null) { e.Node.CheckState = child.Status; } } void radTreeView1_NodeCheckedChanged(object sender, Telerik.WinControls.UI.TreeNodeCheckedEventArgs e) { Child child = e.Node.DataBoundItem as Child; if (child != null) { child.Status = e.Node.CheckState; } }
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(); } }
Please refer to the attached sample project. Run the application on a WIndows 10 machine. Switch on the Narrator and try to expand a node then the EnableRadAccessibilityObjects property is set to true. Workaround: set the EnableRadAccessibilityObjects property to false.
Hi there
I found this issue in RadTreeView filtering
I have a 2-level text structure programmatically created
after creation I use the command
radtree.ExpandAll()
This is the only event handled
Private Sub txtFilter_TextChanged(sender As Object, e As EventArgs) Handles txtFilter.TextChanged
radtreeNavigazione.Filter = txtFilter.Text
End Sub
When I set a filter with at least 4 letters and then I select the text in the filter box and press "back", the app freezes with cpu working at 50 %.
I use this workaround to solve
Private Sub txtFilter_TextChanged(sender As Object, e As EventArgs) Handles txtFilter.TextChanged
radtreeNavigazione.Filter = txtFilter.Text
End Sub
I use this workaround
Private Sub txtFilter_TextChanged(sender As Object, e As EventArgs) Handles txtFilter.TextChanged
radtree.CollapseAll()
radtreeNavigazione.Filter = txtFilter.Text
radtree.ExpandAll()
End Sub
In this way it works, but I wanted to report the issue.
Thank you in advance for your attention
Add CheckedNodes collection of RadTreeView that contains all checked nodes.
The RadTreeView does not reset the SelectedNode when the nodes are cleared in unbound mode.
RadTreeView - DragOverNode event not contains property to determine the drop postion over target node e.Direction is obsolete
An exception is thrown when changing the selection mode from Single to MultiSelect and then scrolling and selecting nodes.
RadTreeView - Traverser throws exception if you clear and recreate all sub nodes of some node. Steps to reproduce: 1. Create RadTreeView with one node. 2. Add 100 sub nodes. 3. Clear the sub nodes. 4. Move scroll. WorkAround: private void RefreshNodes() { radTreeView1.BeginUpdate(); this.radTreeView1.TreeViewElement.Scroller.Traverser.Position = groupNode; this.radTreeView1.TreeViewElement.Scroller.Traverser.Reset(); this.radTreeView1.SelectedNodes.Clear(); groupNode.Nodes.Clear(); AddNodes(groupNode.Nodes, 1, 100); groupNode.Expand(); radTreeView1.EndUpdate(); this.radTreeView1.TreeViewElement.Update(RadTreeViewElement.UpdateActions.Reset); }
Say you have a button which clears the old nodes and adds a number of new child nodes to the currently selected node. If the selected node is collapsed, the newly added nodes are not visible but the scrollbar updates as if they were. Workaround the issue by using the BeginUpdate/EndUpdate methods of RadTreeView when updating the nodes: radTreeView1.BeginUpdate(); node.Nodes.Clear(); foreach (RadTreeNode treeNode in nodes) { node.Nodes.Add((RadTreeNode)treeNode.Clone()); } radTreeView1.EndUpdate();
Currently it is not possible to persist the Text property when using RadTreeView in bound mode. The RadTreeNodeCollection.Add method returns wrong node.
To reproduce: radTreeView1.Filter = "new"; var node = new RadTreeNode( "test" ); radTreeView1.Nodes.Add( node ); //here the node is not in the Nodes collection if ( radTreeView1.Nodes.Contains( node ) == false ) { radTreeView1.Nodes.Add( new RadTreeNode( "test" ) ); } Workaround: remove the filter, perform the desired check and restore the filter
So is there an event triggered for added nodes when using a datasource? I want to set the checked state based on a property on the databound item. Basically this: I have a treeview set like this in Q1 2012: treeViewProjets.DataSource = ViewModel.Projets; treeViewProjets.DisplayMember = @"Nom\Nom"; treeViewProjets.ValueMember = @"Id\Id"; treeViewProjets.ChildMember = @"Projets\ObjetsProjet"; treeViewProjets.NodeAdded += new RadTreeView.RadTreeViewEventHandler(treeViewProjets_NodeAdded); treeViewProjets.NodeAdding += new RadTreeView.RadTreeViewCancelEventHandler(treeViewProjets_NodeAdding); treeViewProjets.NodeFormatting += new TreeNodeFormattingEventHandler(treeViewProjets_NodeFormatting); I get a root node and many child nodes created, but the events NodeAdded and NodeAdding are never triggered, NodeFormatting triggers fine.
To reproduce: private void btnFill_Click(object sender, EventArgs e) { radTreeView.BeginUpdate(); radTreeView.Nodes.Add(new RadTreeNode("root 1")); radTreeView.Nodes.Add(new RadTreeNode("root 2")); radTreeView.Nodes.Add(new RadTreeNode("root 3")); radTreeView.Nodes.Add(new RadTreeNode("root 4")); radTreeView.Nodes[radTreeView.Nodes.Count - 1].Expand(); for (int i = 0; i < 30; i++) { radTreeView.Nodes[radTreeView.Nodes.Count - 1].Nodes.Add(new RadTreeNode("text" +i)); } radTreeView.EndUpdate(); } private void radButton1_Click(object sender, EventArgs e) { radTreeView.BeginUpdate(); foreach (var node in radTreeView.Nodes[radTreeView.Nodes.Count - 1].Nodes.ToArray()) { node.Remove(); } for (int i = 0; i < 99; i++) { radTreeView.Nodes[radTreeView.Nodes.Count - 1].Nodes.Add(new RadTreeNode("aasdasd")); } radTreeView.EndUpdate(); } Workaround - reset the traverser and update the scroll value prior removing the nodes radTreeView.TreeViewElement.Scroller.Traverser.Reset(); this.treeView.TreeViewElement.Scroller.UpdateScrollValue();
Improve the drag and drop indicators by giving more clean user friendly design and positioning.
The problem may be reproduced in example application in TreeView/First Look The scenario is as follows: -enter some text as a filter -delete text - filter should be off -add new node by context menu -> "New Node" appears twice in the tree view