I have a strange problem. Let's look at this code:
TreeNode tn = TreeView1.FindNode("2009/08/12 (1)");
Now I need to remove node:
(THIS DOES NOT WORK!)
(for example, (I know that I do not need to use the TreeView1.FindNode () method, but I = -1 ))
TreeNode tn1 = TreeView1.FindNode(tn.ValuePath);
int i = TreeView1.Nodes.IndexOf(tn1);
or
TreeView1.Nodes.Remove(tn);
The problem is that the codes above do not work, I mean that node is not deleted, why? TreeView is as follows:
alt text http://img130.imageshack.us/img130/230/71970321.png
source
share