Workaround: this.radTreeView1.SelectedNode = null;
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();
To reproduce: this issue is reproducible under Windows8 OS only -add RadTreeView from the Toolbox to the Form and add several tree nodes at design time; -add RadContextMenu from the Toolbox and add several items at design time; Use the following code: public Form1() { InitializeComponent(); this.radTreeView1.RadContextMenu = this.radContextMenu1; } -run the application; -select a tree node; -right mouse click over the node to show the context menu; As a result the main form looses focus and you are unable to click anywhere outside the RadTreeView. This issue is inconstant and it is not appearing every time. Workaround: use ContextMenu property instead: public Form1() { InitializeComponent(); ContextMenu menu = new ContextMenu(); foreach (var item in radContextMenu1.Items) { menu.MenuItems.Add(new MenuItem(item.Text)); } this.radTreeView1.ContextMenu = menu; // this.radTreeView1.RadContextMenu = this.radContextMenu1; }
To reproduce: Add a RadTreeView with some nodes and you will notice that the font is different than other controls. Workaround: void tree_NodeFormatting(object sender, TreeNodeFormattingEventArgs e) { e.NodeElement.ContentElement.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault; }
The issue is valid for Windows 7 and Windows 8 based devices and related to accessibility objects support in our suite
The event is fired then drag and drop is performed in unbound mode but not when in bound mode
When a tree is bound using object-relational binding the editing does not work for nodes that are on level higher than the first.
NullReferenceException in the UpdateLines method somehow triggered by the OnProcessMouseUp handler, when I'm trying to perform a drag and drop move in my treeview, that is fully managed by an inner model. The DnD events are bound and trigger delete + add actions in the tree.
The RadTreeView does not reset the SelectedNode when the nodes are cleared in unbound mode.
FIX. RadTreeView - CreateNode event is not fired when adding a node from the New menu item in the context menu Workaround: Use the NodeAdding/NodeAdded events.
To reproduce: - populate a tree with some nodes in different levels - set the ShowLines to true - select a node on the second level - clear the nodes on a button click => exception is thrown WORKAROUND: radTreeView1.ShowLines = false; radTreeView1.Nodes.Clear(); radTreeView1.ShowLines = true;
bind the tree and try to add a node to the control - error occurs
The following code produces an error when the user attempts to edit the root node: DataTable dt = new DataTable(); DataColumn column = new DataColumn("ID", typeof(int)); column.AllowDBNull = false; column.AutoIncrement = true; dt.Columns.Add(column); dt.Columns.Add(new DataColumn("ParentID", typeof(int))); dt.Columns.Add(new DataColumn("Name", typeof(string))); dt.Columns.Add(new DataColumn("Note", typeof(string))); dt.Rows.Add(1, DBNull.Value, "Root", "Note1"); dt.Rows.Add(2, 1, "First", "Note1"); dt.Rows.Add(3, 1, "Second", "Note1"); dt.Rows.Add(4, 3, "Third", "Note1"); this.radTreeView1.DisplayMember = "Name"; this.radTreeView1.ParentMember = "ParentID"; this.radTreeView1.ChildMember = "ID"; this.radTreeView1.ValueMember = "ID"; this.radTreeView1.DataSource = dt; radTreeView1.TreeViewElement.EditMode = TreeNodeEditMode.Text; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Telerik.WinControls.UI; namespace Lab.Tree { public partial class TreeSelfreferenceEditRootNodeForm : Form { private RadTreeView treeView = new RadTreeView(); private BindingSource bindingSource = new BindingSource(); public TreeSelfreferenceEditRootNodeForm() { InitializeComponent(); treeView.Dock = DockStyle.Fill; treeView.Parent = this; treeView.AllowEdit = true; DataTable dt = new DataTable(); DataColumn column = new DataColumn("ID", typeof(int)); column.AllowDBNull = false; column.AutoIncrement = true; dt.Columns.Add(column); dt.Columns.Add(new DataColumn("ParentID", typeof(int))); dt.Columns.Add(new DataColumn("Name", typeof(string))); dt.Columns.Add(new DataColumn("Note", typeof(string))); dt.Rows.Add(1, DBNull.Value, "Root", "Note1"); dt.Rows.Add(2, 1, "First", "Note1"); dt.Rows.Add(3, 1, "Second", "Note1"); dt.Rows.Add(4, 3, "Third", "Note1"); bindingSource.DataSource = dt; treeView.DisplayMember = "Name"; treeView.ParentMember = "ParentID"; treeView.ChildMember = "ID"; treeView.ValueMember = "ID"; treeView.DataSource = bindingSource; treeView.TreeViewElement.EditMode = TreeNodeEditMode.Text; } } }
1. Create a new project and add empty RadTreeView when handling its Form.Load event. 2. Set its AutoSize property to true. 3. Run the project.
FIX. RadTreeView - updating a field in the DataBoundItem of a node is not automatically reflected
To reproduce: myTree.TreeViewElement.Comparer = new TreeSort(myTree.TreeViewElement); Work around: None
To reproduce: public Form1() { InitializeComponent(); DataTable table = new DataTable(); table.Columns.Add("ID"); table.Columns.Add("Name"); for (int i = 0; i < 10; i++) {
1. Create a new project with RadTreeView. 2. Add 30 nodes in a cycle on Form.Shown event. 3. Use BeginUpdate/EndUpdate methods when adding every single node. 4. Set the SelectedNode property of RadTreeView every time.
1. Place a RadTreeView in a form and add enough items to show scrollbars; 2. Show the form using ShowDialog() and close it 3. Open it again and note that there are no scrollbars in the RadTreeView
We upgraded to Telerik.WinControls 2012.2.726.20 I tried adding a RadTreeNode as follows RadTreeNode rtn1 = new RadTreeNode("C1"); rtn1.CheckType = CheckType.RadioButton; rtn1.CheckState = Telerik.WinControls.Enumerations.ToggleState.On; received an error when running.