树形图鼠标悬停在打开的弹出窗口并显示内容 [英] Tree view mouse over open a pop window and show the contents
本文介绍了树形图鼠标悬停在打开的弹出窗口并显示内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用asp树视图.我已经绑定了数据集的树视图.我想在鼠标悬停时在弹出窗口中显示树视图的内容.我对数据集中的每个节点都有一些描述,如何在鼠标弹出时显示它们结束.
这是我的代码:
Hi,
iam using asp tree view .i have binded tree view from a dataset .I want to show a content of tree view in pop up in mouse over.I have some description for each node in the dataset how to show them in a pop in mouse over.
here is my code:
TVContent.Nodes.Clear();
DataTable topics = dsSOW.Tables["Tableofcontents$"];
drText = dsSOW.Tables["Tableofcontents" + "$"].Select("Mappingcode is NULL");
if (drText.Length > 0)
{
foreach (DataRow drItem in drText)
{
string ss = drItem.ItemArray[1].ToString();
string ss1 = drItem.ItemArray[0].ToString();
if (ss1 != string.Empty)
{
TreeNode node = new TreeNode(ss, ss1);
node.PopulateOnDemand = false;
TVContent.Nodes.Add(node);
PopulateNode(node);
}
}
}
protected void PopulateNode(TreeNode node1)
{
decimal order = Convert.ToDecimal(node1.Value);
drText = dsSOW.Tables["Tableofcontents" + "$"].Select("Mappingcode=''" + order + "''");
if (drText.Length > 0)
{
foreach (DataRow drItem in drText)
{
string ss = drItem.ItemArray[1].ToString();
string ss1 = drItem.ItemArray[0].ToString();
TreeNode node = new TreeNode(ss, ss1);
node1.ChildNodes.Add(node);
snode = node.Value;
if (snode != string.Empty)
{
drText = dsSOW.Tables["Tableofcontents$"].Select("Mappingcode=''" + snode + "''");
if (drText.Length > 0)
{
PopulateNode(node);
}
}
}
}
TVContent.Attributes.Add("OnClick", "OnTreeClick(event)");
}
请帮忙. !
Anusha
Please help. !
Anusha
推荐答案
]; drText = dsSOW.Tables ["Tableofcontents" +"
"]; drText = dsSOW.Tables["Tableofcontents" + "
"].Select(映射代码为NULL"); 如果(drText.Length> 0) { foreach(drText中的DataRow drItem) { 字符串ss = drItem.ItemArray [1] .ToString(); 字符串ss1 = drItem.ItemArray [0] .ToString(); 如果(ss1!= string.Empty) { TreeNode节点=新的TreeNode(ss,ss1); node.PopulateOnDemand = false; TVContent.Nodes.Add(node); PopulateNode(node); } } } 受保护的void PopulateNode(TreeNode node1) { 十进制顺序= Convert.ToDecimal(node1.Value); drText = dsSOW.Tables ["Tableofcontents" +"
"].Select("Mappingcode is NULL"); if (drText.Length > 0) { foreach (DataRow drItem in drText) { string ss = drItem.ItemArray[1].ToString(); string ss1 = drItem.ItemArray[0].ToString(); if (ss1 != string.Empty) { TreeNode node = new TreeNode(ss, ss1); node.PopulateOnDemand = false; TVContent.Nodes.Add(node); PopulateNode(node); } } } protected void PopulateNode(TreeNode node1) { decimal order = Convert.ToDecimal(node1.Value); drText = dsSOW.Tables["Tableofcontents" + "
"].Select("Mappingcode =""+顺序+""); 如果(drText.Length> 0) { foreach(drText中的DataRow drItem) { 字符串ss = drItem.ItemArray [1] .ToString(); 字符串ss1 = drItem.ItemArray [0] .ToString(); TreeNode节点=新的TreeNode(ss,ss1); node1.ChildNodes.Add(node); snode = node.Value; 如果(snode!= string.Empty) { drText = dsSOW.Tables ["Tableofcontents
"].Select("Mappingcode=''" + order + "''"); if (drText.Length > 0) { foreach (DataRow drItem in drText) { string ss = drItem.ItemArray[1].ToString(); string ss1 = drItem.ItemArray[0].ToString(); TreeNode node = new TreeNode(ss, ss1); node1.ChildNodes.Add(node); snode = node.Value; if (snode != string.Empty) { drText = dsSOW.Tables["Tableofcontents
这篇关于树形图鼠标悬停在打开的弹出窗口并显示内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文