Treeview remove property problem

Posted by curiosity on Stack Overflow See other posts from Stack Overflow or by curiosity
Published on 2011-01-10T05:41:28Z Indexed on 2011/01/10 5:53 UTC
Read the original article Hit count: 128

Filed under:
|
|
|
|

Hi,

i added a SampleNode to the treeview.

if i remove any node from SampleNode,

like,

TreeNode[] nodes = this.SampleNode.Nodes.Find(node.Text, true);
      if (nodes.Length > 0)
      {
        int j = nodes[0].Index;
        if (nodes.Length > 0)
          this.SampleNode.Nodes[j].Remove();
      }

it is deleted in treeview but not in SampleNode. Why does this happens?

what is the solution?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET