如何在javascript中展开和折叠asp treeview [英] How to expand and collapse asp treeview in javascript

查看:97
本文介绍了如何在javascript中展开和折叠asp treeview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
我需要示例代码用于asp treeview的展开和折叠,我使用带有启用复选框的treeview,如果我单击父节点复选框它会展开所有子节点,如果我取消选中父节点它会折叠子节点节点,请尽快回复。



注意:不要使用+符号进行展开和折叠,在树视图中启用复选框ture,使用该复选框仅展开和折叠nodes.In JavaScriipt



Thanx

Aravind

解决方案

嗨Aravindba,



我已经在我的项目中实现了一次,它提醒我一旦你问这个问题,

会在这里粘贴我的代码这样你就可以在你的代码中使用它。

 container.find( #btn_CollapseAllPennyTests)。unbind(  click) .click(function(){
//


(。penny-test-group-row)。最近的( tr)。not(:first)。not(。Penny-Test-Group-All)。hide();


。odd)。nearest( TR)隐藏();

hi I need sample code for expand and collapse for asp treeview ,i use treeview with enable checkbox,if i click the parent node checkbox it expand all child node ,if i uncheck the parent node it collapse the child node,pls reply asap.

Note : not use "+" symbol for expand and collapse,enable the checkbox ture in treeview,using that checkbox only expand and collapse the nodes.In JavaScriipt

Thanx
Aravind

解决方案

Hi Aravindba,

I have implemented the same in my project once, It reminds me once you asked this question,
will paste my code for you here so that you can make use of it in your code.

container.find("#btn_CollapseAllPennyTests").unbind("click").click(function () {
    //


(".penny-test-group-row").closest("tr").not(":first").not(".Penny-Test-Group-All").hide();


(".odd").closest("tr").hide();


这篇关于如何在javascript中展开和折叠asp treeview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆