访问treeview的所有子节点 [英] access all child nodes of treeview

查看:93
本文介绍了访问treeview的所有子节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有节点和子节点的树状视图.每个节点在标签中都有值.我如何获取所选节点的所有子节点值(作为数据表等)

i have a treeview with nodes and child nodes.each node have values in tags.how can i get all child node valus of a selected node (as a datatable etc.)

推荐答案

我想您已经选择了TreeNode ...

每个TreeNode都有一个Nodes集合,该集合由TreeNode的子节点的集合组成.那就是访问它们的方法...

请查看此链接: http://msdn.microsoft.com/zh-CN /library/system.windows.forms.treenode.aspx [ ^ ]

格里兹,佩里
I suppose you have the selected TreeNode...

Each TreeNode has a Nodes collection, which consists of a collection of the TreeNode''s childnodes. That is how to access them...

check out this link: http://msdn.microsoft.com/en-us/library/system.windows.forms.treenode.aspx[^]

Grtz, Perry


这篇关于访问treeview的所有子节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆