We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

TreeViewAdv - clear nodes collection results in strange behaviour

Hi, I''m using Syncfusion v4.102.0.50 and have a problem with deleting "all" child nodes of a desired EXPANDED parent node (node11). When doing so, node11 and all its next siblings (node12, node13, ...) vanish from the treeviewadv. Collapsing and expanding node11''s parent restores the treeview. If node11 isn''t EXPANDED, removing all of his children doesn''t cause a problem. Am I doing something wrong or is this a bug? I implemented and attached a small sample showing this issue. Just press the "remove" button after starting. Thanks! Yours Christian

TreeViewtest0.zip

4 Replies

DW dwedewdew May 4, 2006 10:30 AM UTC

Note: < Collapsing and expanding node11''s parent restores the treeview. This only works for the root node. Collapsing a node between root and node11 (after removing children of node11) makes the treeview vanish from screen.


DT Deepa TS Syncfusion Team May 4, 2006 02:37 PM UTC

Hi Christian, My sincere apologise for the inconvenience caused. I was able to reproduce the issue and I have logged a bug report bug #2023 Bug in deleting "all" child nodes of a desired EXPANDED parent node . Regarding this issue you could track the status of this bug fix in the above link.We will try our very best to address this issue at the earliest with very highest priority. However, as a workaround you can replace the following code in removing the childNodes of desired EXPANDED parent node. void button1_Click(object sender, EventArgs e) // remove { TreeNodeAdvCollection nodes = new TreeNodeAdvCollection(); foreach (TreeNodeAdv node in this.treeViewAdv1.Nodes[0].Nodes[0].Nodes[1].Nodes) nodes.Add(node); foreach (TreeNodeAdv node in nodes) { this.treeViewAdv1.Nodes[0].Nodes[0].Nodes[1].Nodes.Remove(node); } } Please take a look at the attached sample and let me know if this helps you. Thanks, Deepa.

TreeViewtest1.zip


DW dwedewdew May 5, 2006 11:04 AM UTC

Hi Deepa, slow (for my amount of nodes), but it works. Thanks a lot! Yours Christian.


DT Deepa TS Syncfusion Team June 6, 2006 11:04 AM UTC

Hi Christian, The fix for the #2023 "Bug in deleting "all" child nodes of a desired EXPANDED parent node " issue has been included in our final release of v.4.2 (v.4.2.0.37). And you can download the same from the following link: 4.2V FinalRelease Let me know if you need any further assistance. Thanks for your interest in Syncfusion products. Regards, Deepa

Loader.
Live Chat Icon For mobile
Up arrow icon