Treeview节点在已经填充时显示null [英] Treeview node showing null while its already fill

查看:97
本文介绍了Treeview节点在已经填充时显示null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个树形视图,我从活动目录填充我试图在树视图中实现搜索,它返回null,而它已经填充了Active目录数据

I have a tree view which i am populating from active directory i am trying to implement search in tree view , its returning null while its already fill with Active directory data

TreeNode node = TreeView1.FindNode("Txt.Text");   <<<---- TreeView1 = null
                foreach (var childNode in node.ChildNodes)
                {

                }

推荐答案

FindNode [ ^ ]接受valuePath [ ^ ]作为具有特定 PathSeparator [ ^ ]。好像,你输错了值。
FindNode[^] accepts valuePath[^] as a parameter with specific PathSeparator[^]. Seems, you pass wrong value.


这篇关于Treeview节点在已经填充时显示null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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