日期:2014-05-17 浏览次数:20515 次
for (int i = 0; i <= TreeView1.Nodes.Count; i++)//循环
{
string nodeValue= TreeView1.Nodes[i].value;//节点的文本
string sqlNodeValue = "";//这是你数据库取出的值
if (nodeTxt == sqlNodeTxt)//判断是否相等
{
TreeView1.Nodes[i].Checked = true;//选中
}
}
------解决方案--------------------
这个得绕啊
------解决方案--------------------