C#搜索TreeView子节点 保留父节点的方法.docx
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《C#搜索TreeView子节点 保留父节点的方法.docx》由会员分享,可在线阅读,更多相关《C#搜索TreeView子节点 保留父节点的方法.docx(1页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、C#搜索Treeview子节点,保存父节点的方法本文实例讲述了C#搜索Treeview子节点,保存父节点的方法。提供给大家。具体如下:C#搜索TreeView子节点保存父节点:private void selectNodeBy Name(string name)(重新生生成树,InitTvCatalogO;删除节点selectNode(tvCatalog. Nodes, name);)private void selectNode(TreeNodeCollection nodes, string name)(bool del = true;for (int i = nodes .Count -
2、1; i = 0; i-)(TreeNode node = nodesi;del = true;if (node. Nodes .Count != 0)(selectNode(node. Nodes, name);if (node.Text .StartsWith(name, StringComparison.OrdinallgnoreCase)(del = false;else(del = true;)if (del & node. Nodes .Count = 0)(node. Remove();)tvCatalog. ExpandAIIO;)WPF搜索TreeView子节点保存父节点:p
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- C#搜索TreeView子节点 保留父节点的方法 C# 搜索 TreeView 节点 保留 方法
![提示](https://www.taowenge.com/images/bang_tan.gif)
限制150内