会员
众包
新闻
博问
闪存
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
上午的绝缘杯
首页
新随笔
联系
管理
默认选中TreeView某个节点的方法
困扰偶很长时间的问题了,感谢qwe:)
/**/
///
<summary>
///
选中treeview的某个节点,需要每个node的value不同
///
</summary>
///
<param name="sNodeValue"></param>
private
void
checkNode(TreeView tv,
string
sNodeValue)
{
foreach
(TreeNode tRoot
in
tv.Nodes)
{
if
(tRoot.Value
==
sNodeValue)
{
tRoot.Select();
}
else
{
if
(tRoot.ChildNodes
!=
null
)
{
foreach
(TreeNode tChild
in
tRoot.ChildNodes)
{
if
(tChild.Value
==
sNodeValue)
tChild.Select();
}
}
}
}
}
posted on
2007-08-02 16:55
上午的绝缘杯
阅读(
4105
) 评论(
4
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部