Treeview insert property problem

Posted by curiosity on Stack Overflow See other posts from Stack Overflow or by curiosity
Published on 2011-01-06T11:27:54Z Indexed on 2011/01/06 12:54 UTC
Read the original article Hit count: 86

Filed under:
|
TreeNode[] nodes = this.treeview.Nodes.Find(node.Text, true);
      if (nodes.Length > 0)
      {
        int i = nodes[0].Index;
        if (nodes.Length > 0)
          this.treeview.Nodes.Remove(nodes[0]);
        this.treeview.Nodes.Insert(i, nodes[0]);
      }

i tried this code,

but the node nodes[0] is not inserting into the particular index.

instead it is adding at the last.

but yes i use treeviewsorter.

Any idea how to insert node without using insert

or using insert effectively with treeviewsorter??

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET