To reproduce: - add a RadTreeView - enable multiselect - select at least 1 node - call radTreeView1.SelectedNodes.Clear() Workaround: Clear the nodes manually: foreach (var node in this.radTreeView1.SelectedNodes.ToList()) { node.Selected = false; }
Applied Font Styles for every Node not loaded correctly - all have a defaul value
In RadTreeView, the dragged node is not positioned at the right place, when you try to drop it before the target node.
The GetNodeByName method will return a node with the specified name
There should be a convenient way to hide the expander icon and to show lines when using full lazy mode.
If you add nodes to RadTreeView inside defer refresh using in the constructor of the form, the some of them appears with smaller font size.
Summary of the program logic: The app allows the user to edit hierarchical data that is serialized/deserialized from an XML file. It is first deserialized into a collection of business objects that are structured hierarchically: MetadataNode --LongNameEnglish::string --LongNameArabic::string --Nodes::BindingList<MetadataNode> I take this hierarchical collection and flatten it out so that each node references the Id of its parent node (self-referencing): --Node 1 (Id:1, ParentId:null) ----Node 1-1 (Id:2, ParentId:1) ----Node 1-2 (Id:3, ParentId:1) In the attached project, if you run it and select File->Open Data File and browse to and select the Metadata2.xml file that I included in the root of the ZIP archive, then click the add button (the icon with the "+" symbol on top of the treeview control), the code in the AddNode function works as expected--it calls RadTreeView.BeginUpdate(), adds a new item to the datasource (a BindingList<MetadataNode> collection), then calls RadTreeView.EndUpdate(). However, if you run the application and select File->New Data File and click the add button, the same code throws a NullReferenceException when the RadTreeView.EndUpdate() method is called.
NodeMouseDown event is not fired when the image of the TreeNodeElement is clicked.
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.
A NullReferenceException is thrown when the nodes are cleared and new selected nodes are determined.
When the ShowLines property is set to true, the lines that link nodes in RadTreeView are not rendered appropriately for some levels. Comment: When using full lazy mode RadGridView displays expander icon for all nodes. When it is hidden there is a whitespace. You can show tree lines only with code.
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); }
When you add a new node in self-referencing hierarchy, several nodes are added on random levels. In addition, if you remove an existing node, a NullReferenceException is thrown. test project: using System.Data; using System.Windows.Forms; using Telerik.WinControls.UI; namespace Lab.Tree { public partial class TreeSelfReferenceAddFrom : Form { private RadTreeView treeView = new RadTreeView(); public TreeSelfReferenceAddFrom() { InitializeComponent(); treeView.Dock = DockStyle.Fill; treeView.Parent = this; treeView.AllowDefaultContextMenu = true; treeView.AllowAdd = true; treeView.AllowEdit = true; treeView.AllowDrop = true; treeView.AllowDragDrop = true; treeView.AllowRemove = true; DataTable table = new DataTable(); table.Columns.Add("ID"); table.Columns.Add("ParentID"); table.Columns.Add("Name"); table.Rows.Add(1, 0, "Name1"); table.Rows.Add(2, 0, "Name2"); table.Rows.Add(3, 0, "Name3"); table.Rows.Add(4, 1, "Name5"); table.Rows.Add(5, 1, "Name6"); table.Rows.Add(6, 3, "Name6"); treeView.DisplayMember = "Name"; treeView.ChildMember = "ID"; treeView.ParentMember = "ParentID"; treeView.DataSource = table; } } }
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.
While a node is dragged and right mouse button is clicked, the dragged node is replaced with the selected node.
When the RadTreeView is not in full row select mode, the selected node crops its text.
ValueValidating and ValidationError are fired twice when message box is shown in the event handler of ValidationError event.
To reproduce: for (int i = 0; i < 10; i++) { this.radTreeView1.Nodes.Add("Node1." + i); } this.radTreeView1.AllowDragDrop = true; this.radTreeView1.TreeViewElement.DragDropService.ShowDragHint = false; Workaround: this.radTreeView1.TreeViewElement.DragDropService.PreviewDragHint += DragDropService_PreviewDragHint; private void DragDropService_PreviewDragHint(object sender, PreviewDragHintEventArgs e) { e.UseDefaultHint = false; }
To reproduce: public RadForm1() { InitializeComponent(); for (int i = 0; i < 10; i++) { this.radTreeView1.Nodes.Add("Node1." + i); } this.radTreeView1.AllowDragDrop = true; this.radTreeView1.TreeViewElement.DragDropService.PreviewDragDrop+=DragDropService_PreviewDragDrop; } private void DragDropService_PreviewDragDrop(object sender, RadDropEventArgs e) { e.Handled = true; }
The XML serialization of RadTreeNode does not serialize its Font and ForeColor properties. The XML deserialization does not create a checked nodes from xml file that contains serialized checked nodes.