Completed
Last Updated: 05 Mar 2014 08:33 by ADMIN
ADMIN
Georgi I. Georgiev
Created on: 08 Nov 2013 05:54
Category: TreeView
Type: Bug Report
0
FIX. RadTreeView - Clearing the Nodes does not clear selected nodes
To reproduce: Add a RadTreeView with hierarchical data. Select a node with hierarchy level > 0. Call the Clear method of the Nodes collection. Refill the tree, drag and drop a node, you will see that two nodes will be dropped since the previous node's Selected property is set to true. 

Workaround: private void DetachAllNodes(RadTreeNode parent) { this.CleanNode(parent); foreach (RadTreeNode node in parent.Nodes) { this.DetachAllNodes(node); } } private void CleanNode(RadTreeNode node) { node.Current = false; node.Selected = false; } foreach (RadTreeNode node in tree.Nodes) { this.DetachAllNodes(node); } tree.Nodes.Clear();
0 comments