积极答复者
如何在现有treeView中添加节点

问题
答案
-
treeView1.Nodes["C"].Nodes["D"].Nodes.Add("E");
因为D是C的子节点,不是treeView的子节点。
If you think one reply solves your problem, please mark it as An Answer, if you think someone's reply helps you, please mark it as a Proposed Answer
Help by clicking:
Click here to donate your rice to the poor
Click to Donate
Click to feed Dogs & Cats
Found any spamming-senders? Please report at: Spam Report- 已编辑 ThankfulHeartModerator 2013年6月8日 8:22
- 已标记为答案 vboykk 2013年6月17日 13:02
-
更多关于TreeView的操作可以参考这个文章来学习:
http://www.cnblogs.com/yiyb/archive/2012/11/22/2783128.html
http://www.cnblogs.com/genghechuang/archive/2011/10/27/2226018.html
If my post is helpful,please help to vote as helpful, if my post solve your question, please help to make it as answer. my sample
- 已编辑 ThankfulHeartModerator 2013年6月10日 5:45 不建议重复已有的答案,除非做出补充或者讨论。
- 已标记为答案 vboykk 2013年6月17日 13:02
全部回复
-
treeView1.Nodes["C"].Nodes["D"].Nodes.Add("E");
因为D是C的子节点,不是treeView的子节点。
If you think one reply solves your problem, please mark it as An Answer, if you think someone's reply helps you, please mark it as a Proposed Answer
Help by clicking:
Click here to donate your rice to the poor
Click to Donate
Click to feed Dogs & Cats
Found any spamming-senders? Please report at: Spam Report- 已编辑 ThankfulHeartModerator 2013年6月8日 8:22
- 已标记为答案 vboykk 2013年6月17日 13:02
-
更多关于TreeView的操作可以参考这个文章来学习:
http://www.cnblogs.com/yiyb/archive/2012/11/22/2783128.html
http://www.cnblogs.com/genghechuang/archive/2011/10/27/2226018.html
If my post is helpful,please help to vote as helpful, if my post solve your question, please help to make it as answer. my sample
- 已编辑 ThankfulHeartModerator 2013年6月10日 5:45 不建议重复已有的答案,除非做出补充或者讨论。
- 已标记为答案 vboykk 2013年6月17日 13:02