如何在用户控件里实现treeview的单击和双击事件?另外哪里可以下载免费的 Infragistics  NetAdvantage ?

解决方案 »

  1.   

    1、单击:
    <body onload="boundclick();">function boundclick()
    {
    var treeview1 = document.getElementById("TreeView1");
    treeview1.onselectedindexchange = treeclick;
    }function treeclick()
    {
        ....
    }
      

  2.   

    把节点的文本写成HTML的
    tmpTNCs = new Microsoft.Web.UI.WebControls.TreeNode(); //定义结点
    tmpTNCs.ID = strID;
    tmpTNCs.Text = "<p onclick='clickevent();' ondblclick='ondblclickevent'>Test</p>"
      

  3.   

    1、单击:
    <body onload="boundclick();">function boundclick()
    {
    var treeview1 = document.getElementById("TreeView1");
    treeview1.onselectedindexchange = treeclick;
    }function treeclick()
    {
        var treeview1 = document.getElementById("TreeView1");

        var selectedIndex = event.newTreeNodeIndex;
        
        ....
    }2、双击:
    本身没有提供,很难实现;
      

  4.   

    1.
    看这个网站: XML讲得较仔细些
    http://www.microsoft.com/china/msdn/archives/library/workshop/webcontrols/overview/treeview.asp2.
    引用:
    http://community.csdn.net/Expert/topic/4196/4196863.xml?temp=9.365261E-03
    http://community.csdn.net/Expert/topic/3169/3169028.xml?temp=.8414118