Steps to reproduce:
1. Set SortOrder to Ascending
2. Rename a root node
Hello, Xavier,
I am sorry to hear that the suggested solution doesn't work correctly all the time. Due to the specificity of the issue, I am unable to suggest an appropriate solution. I would like to note that the issue is currently in development process. We will do our best to introduce a fix as soon as possible in the upcoming service pack or latest internal builds. Make sure that you subscribe to this item in order to get notified when its status has changed.
Please excuse us for the inconvenience caused. Let me know if there is anything else I can help with.
Regards,
Nadya
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hello
i tried your solution, the first time it works fine.
If we do the manipulation several times, it does not work or we have an error
Hello, Xavier,
Currently, the possible solution I can suggest is to change the sort order to None when the node is editing and later restore it to desired order:
public TreeForm()
{
InitializeComponent();
radTreeView.Editing += this.RadTreeView_Editing;
radTreeView.Edited += this.RadTreeView_Edited;
this.radTreeView.AllowEdit = true;
this.radTreeView.SortOrder = System.Windows.Forms.SortOrder.Ascending;
RadTreeNode root = new RadTreeNode("Root");
radTreeView.Nodes.Add(root);
RadTreeNode itemA = new RadTreeNode("ItemA");
root.Nodes.Add(itemA);
itemA.Nodes.Add(new RadTreeNode("ASubItemA"));
itemA.Nodes.Add(new RadTreeNode("ASubItemB"));
itemA.Nodes.Add(new RadTreeNode("ASubItemC"));
RadTreeNode itemB = new RadTreeNode("ItemB");
root.Nodes.Add(itemB);
itemB.Nodes.Add(new RadTreeNode("BSubItemA"));
itemB.Nodes.Add(new RadTreeNode("BSubItemB"));
RadTreeNode itemC = new RadTreeNode("ItemC");
root.Nodes.Add(itemC);
itemC.Nodes.Add(new RadTreeNode("CSubItemA"));
itemC.Nodes.Add(new RadTreeNode("CSubItemB"));
itemC.Nodes.Add(new RadTreeNode("CSubItemD"));
itemC.Nodes.Add(new RadTreeNode("CSubItemE"));
radTreeView.ExpandAll();
}
private void RadTreeView_Edited(object sender, TreeNodeEditedEventArgs e)
{
radTreeView.SortOrder = System.Windows.Forms.SortOrder.Ascending;
}
private void RadTreeView_Editing(object sender, TreeNodeEditingEventArgs e)
{
radTreeView.SortOrder = System.Windows.Forms.SortOrder.None;
}
I hope this helps.
Regards,
Nadya
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.