查找TREEVIEW的根节点值
private string getTreeViewRootNode(TreeView treeview)
{
TreeNode tnode = treeview.SelectedNode;
if (tnode != null)
{
while(tnode.Parent != null)
{
tnode = tnode.Parent;
}
return tnode.Text;
}
else
{
return "";
}
}
{
TreeNode tnode = treeview.SelectedNode;
if (tnode != null)
{
while(tnode.Parent != null)
{
tnode = tnode.Parent;
}
return tnode.Text;
}
else
{
return "";
}
}