日期:2014-05-19  浏览次数:20510 次

asp.net2.0TreeView双击节点文字展开子节点怎么实现?
asp.net2.0TreeView双击节点文字展开子节点怎么实现?单击就已经回传了

------解决方案--------------------
如果是开始就生成了全部,用TreeNode 的SelectAction就可以了,如果不是可以用Populate事件
------解决方案--------------------
可以使用Xml文档TreeView来配合使用,建立一个TreeView和一个XmlDataSource,把XmlDataSource的数据源指向这个xml文档
xml格式
<?xml version= "1.0 " encoding= "utf-8 " ?>
<Root url= " " name= " " describe= " ">
<Parent url= " " name= " " describe= " ">
<Child url= " " name= " " describe= " " />
<Child url= " " name= " " describe= " " />
<Child url= " " name= " " describe= " " />
</Parent>
<Parent url= " " name= " " describe= " ">
<Child url= " " name= " " describe= " " />
<Child url= " " name= " " describe= " " />
<Child url= " " name= " " describe= " " />
</Parent>
</Root>
最后绑定TreeView即可