如何在树视图中读取cheked节点 [英] how to read cheked node in tree view

查看:59
本文介绍了如何在树视图中读取cheked节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我正在使用带有asp.net/vb复选框的treeview工具。我想读取树视图的已检查节点,而不是要在消息框中显示。我使用了treeview1.selectednode.text代码,但它无法正常工作... plz help

解决方案

试试下面的代码,它会帮助你...



 如果 TreeView1.CheckedNodes.Count>  0  然后 
对于 < span class =code-keyword>每个节点作为 TreeNode TreeView1.CheckedNodes
MessageBox.Show(node.Text.ToString())
下一步
结束 如果


hey, i am using treeview tool with check boxes in asp.net/vb. i want to read the checked node of tree view than want this to show in message box . i have used treeview1.selectednode.text code but its not working ... plz help

解决方案

Try the below code, It will help you...

If TreeView1.CheckedNodes.Count > 0 Then
    For Each node As TreeNode In TreeView1.CheckedNodes
        MessageBox.Show(node.Text.ToString())
    Next
End If


这篇关于如何在树视图中读取cheked节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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