The context menu does not open at the right position when context menu button is used.
Cut, Copy and Paste menu items in default context menu of RadTreeView are not localizable.
The child nodes are aligned to the root nodes when ShowRootLines property is set to false.
Checked state of the disabled nodes's check boxes is changed after scrolling.
There is no way to reset the style of node to its default one by using its Style property.
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.
In RadTreeView, the dragged node is not positioned at the right place, when you try to drop it before the target node.
To reproduce: - Add a RadTreeView which have parent and child nodes to a form. - Expand nodes until the both scrollbars are simultaneously shown. - You will notice that you cannot scroll to the last item. Workaround: - Subscribe to the following ScrollerUpdated event handler: void Scroller_ScrollerUpdated(object sender, EventArgs e) { radTreeView1.TreeViewElement.InvalidateMeasure(); } - You can subscribe to this event with the following line of code: radTreeView1.TreeViewElement.Scroller.ScrollerUpdated += Scroller_ScrollerUpdated;
To reproduce: Add a RadTreeView to a form and use the following code: private List<EntityA> entities = new List<EntityA>(); public Form1() { InitializeComponent(); radTreeView1.TriStateMode = true; entities = new List<EntityA>(); for (int i = 0; i < 10; i++) { var newEntityI = new EntityA(i.ToString()); for (int j = 0; j < 100; j++) { var newEntityJ = new EntityB(j.ToString()); for (int k = 0; k < 1000; k++) { var newEntityK = new EntityC(k.ToString()); newEntityJ.Entities.Add(newEntityK); } newEntityI.Entities.Add(newEntityJ); } entities.Add(newEntityI); } } private void checkBox1_CheckedChanged(object sender, EventArgs e) { foreach (var node in radTreeView1.Nodes) { node.Checked = checkBox1.Checked; } } private void radTreeView1_NodesNeeded(object sender, NodesNeededEventArgs e) { if (e.Parent == null) { foreach (var entity in entities) { e.Nodes.Add(new RadTreeNode(entity.Name, false) { CheckState = ToggleState.Off, Tag = entity }); } } else if (e.Parent.Tag is EntityA) { var currentEntity = e.Parent.Tag as EntityA; foreach (var entity in currentEntity.Entities) { e.Nodes.Add(new RadTreeNode(entity.Name, false) { CheckState = e.Parent.CheckState, Tag = entity }); } } else if (e.Parent.Tag is EntityB) { var currentEntity = e.Parent.Tag as EntityB; foreach (var entity in currentEntity.Entities) { e.Nodes.Add(new RadTreeNode(entity.Name, false) { CheckState = e.Parent.CheckState, Tag = entity }); } } else if (e.Parent.Tag is EntityC) { } } Put a breakpoint in the last If statement, you will notice that the breakpoint is being hit, while it is not if the TrieStateMode is set to false Workaround: Use the following custom RadTreeNode: public class MyTreeNode : RadTreeNode { private FieldInfo triStateField; public MyTreeNode() : base() { } public MyTreeNode(string text) : base(text) { } public MyTreeNode(string text, RadTreeNode[] children) : base(text, children) { } public MyTreeNode(string text, bool expanded) : base(text, expanded) { } public MyTreeNode(string text, Image image) : base(text, image) { } public MyTreeNode(string text, Image image, bool expanded) : base(text, image, expanded) { } public override ToggleState CheckState { get { return base.CheckState; } set { bool set = false; if (this.TreeViewElement != null && this.TreeViewElement.TriStateMode) { if (this.triStateField == null) { this.triStateField = typeof(RadTreeViewElement).GetField("triStateMode", BindingFlags.Instance | BindingFlags.NonPublic); } triStateField.SetValue(this.TreeViewElement, false); set = true; } base.CheckState = value; if (set) { this.triStateField.SetValue(this.TreeViewElement, true); } } } }
To reproduce: Add a RadTreeView and a Timer(from the Windows.Forms namespace). Set the timer's interval to some short duration and add nodes to tree on its tick event. Scroll the thumb while the timer is ticking. At some point you will notice that the scrollbar's maximum value is not correct. Workaround: Do not add nodes while scrolling: List<string> cachedValues = new List<string>(); System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer() { Interval = 100 }; void radTreeView1_MouseCaptureChanged(object sender, EventArgs e) { timer.Start(); } void timer_Tick(object sender, EventArgs e) { timer.Stop(); if (this.cachedValues.Count > 0 && !radTreeView1.TreeViewElement.Scroller.Scrollbar.ThumbElement.Capture) { foreach (string value in this.cachedValues) { root.Nodes.Add(value); } cachedValues.Clear(); } } private void timerUpdateNodes_Tick(object sender, EventArgs e) { for (int i = 0; i < 10; ++i) { if (random.NextDouble() < .2) { if (radTreeView1.TreeViewElement.Scroller.Scrollbar.ThumbElement.Capture) { cachedValues.Add("Node"); } else { root.Nodes.Add("Node"); } } } }
Set separate indent for every node in RadTreeView. Currently we support setting the same indent for every node thorough TreeIndent property.
DragEnding event is not fired in some cases.
1. Have some tree with nodes and subnodes. Expand some of the nodes one by one until vertical scrollbar appears. At the same time, there should be more nodes which have subnodes left 2. Do "Expand all" on some other node which is not expanded yet. Code used: "node.ExpandAll()" Scroll bar reflect the area change and you can scroll up and down, it's ok 3. Do "Collapse all" on same node. Code used: "node.Collapse()"
1. Create a new project with RadTreeView 2. Handle the NodeCheckedChanged event 3. Call the ExpandAll method for the checked node when handling this event 4. Run the project and check the first node
Buttons are not visible when using custom DPI settings in RadTreeView property builder.
Add some event i.e. NodeCheckedChanging in order to detect when a node check box is clicked. This state changing should be able to be canceled/
drag select nodes. I.e - Left click and drag to highlight / select a bunch of nodes in a treeview. Ticket ID: 319445
FIX. RadTreeView - setting the AllowDragDrop property adds in the designer setting for the depricated AllowDragDropBetweenTreeViews property.
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; }
To reproduce: Add a RadTreeView ,add nodes, enable TriState, disable AutoCheckChildNodes and use this code: void cxTreeView2_NodeCheckedChanging(object sender, RadTreeViewCancelEventArgs e) { if (!cxTreeView2.AutoCheckChildNodes && cxTreeView2.CheckBoxes && cxTreeView2.TriStateMode) { cxTreeView2.TreeViewElement.NodeCheckedChanging -= cxTreeView2_NodeCheckedChanging; if (e.Node.CheckState == ToggleState.Indeterminate) { e.Cancel = true; e.Node.CheckState = ToggleState.On; CheckAllChildren(e.Node); } cxTreeView2.TreeViewElement.NodeCheckedChanging += cxTreeView2_NodeCheckedChanging; } } void CheckAllChildren(RadTreeNode parent) { foreach (var node in parent.Nodes) { node.CheckState = ToggleState.On; CheckAllChildren(node); } } Click a top node two times and remove the mouse from the checkbox, it is now showing as Indetermined but the data item is on. Workaround: void cxTreeView2_NodeCheckedChanging(object sender, RadTreeViewCancelEventArgs e) { if (!cxTreeView2.AutoCheckChildNodes && cxTreeView2.CheckBoxes && cxTreeView2.TriStateMode) { cxTreeView2.TreeViewElement.NodeCheckedChanging -= cxTreeView2_NodeCheckedChanging; if (e.Node.CheckState == ToggleState.Indeterminate) { e.Cancel = true; e.Node.CheckState = ToggleState.On; CheckAllChildren(e.Node); cxTreeView2.TreeViewElement.Update(RadTreeViewElement.UpdateActions.Reset); } cxTreeView2.TreeViewElement.NodeCheckedChanging += cxTreeView2_NodeCheckedChanging; } } void CheckAllChildren(RadTreeNode parent) { foreach (var node in parent.Nodes) { node.CheckState = ToggleState.On; CheckAllChildren(node); } }