function treepanelcheck(item) {
treepanelchildcheck(item);
treepanelparentcheck(item);
}
function treepanelchildcheck(item) {
var chNode;
if (item.childNodes.length > 0) {
if (item.attributes.checked == true) {
for (var i = 0; i < item.childNodes.length; i++) {
chNode = item.childNodes[i];
chNode.attributes.checked = true;
chNode.getUI().checkbox.checked = true;
}
}
if (item.attributes.checked == false) {
for (var i = 0; i < item.childNodes.length; i++) {
chNode = item.childNodes[i];
chNode.attributes.checked = false;
chNode.getUI().checkbox.checked = false;
}
}
}
}
function treepanelparentcheck(item) {
var chNode;
var checkBool;
if (item.parentNode.parentNode != null) {
if (item.attributes.checked == false) {
for (var i = 0; i < item.parentNode.childNodes.length; i++) {
chNode = item.parentNode.childNodes[i];
if (chNode.attributes.checked == true) {
checkBool = true;
break;
}
//chNode.attributes.checked = true;
}
if (checkBool == true) {
item.parentNode.attributes.checked = true;
item.parentNode.getUI().checkbox.checked = true;
}
else {
item.parentNode.attributes.checked = false;
item.parentNode.getUI().checkbox.checked = false;
}
}
if (item.attributes.checked == true) {
item.parentNode.attributes.checked = true;
if (item.parentNode.getUI().checkbox != null) {
item.parentNode.getUI().checkbox.checked = item.attributes.checked;
}
}
}
}
<Listeners>
<CheckChange Handler="treepanelcheck(node)" />
</Listeners>
分享到:
相关推荐
一个Coolite TreePanel TabPanel的网站后台框架示例 Coolite 是一个用C#封装了ExtJS的Ajax控件,后台效果的用户体验还是很不错的! 项部是一个图片,左边一棵树形,树形可以从后台配置,点击叶子结点时从Tabs页内依次打开...
向各位推荐一下用Coolite来部局,用后台数据库数据绑定到TreePanel上,当点不同的节点,在TabPanel上添加一个Tab。并显示要显示的网页。
该代码中提供了TreePanel树形菜单的生成代码!而且可以很方便的添加一个右键弹出菜单!(添加一个contextmenu)希望大家多多交流!
Coolite笔Coolite笔记Coolite笔记
coolite 0.8 类库文档coolite 0.8 类库文档coolite 0.8 类库文档coolite 0.8 类库文档
coolite教程 coolite教程.pdf coolite教程.pdf coolite教程.pdf coolite教程.pdf
coolite MVC coolite MVC coolite MVC coolite MVC coolite MVC
coolite 0.8中文类库 Coolite Toolkit是基于跨浏览器的ExtJS 库开发而来的,是一个支持ASP.NET AJAX的Web控件,并且简化了开发步骤。
coolite学习笔记coolite学习笔记coolite学习笔记coolite学习笔记
无论你需要coolite什么样的demo,这里面都包含了
coolite简介,学习extjs 的朋友们请注意了哦!
Coolite ASP.NET Web控件包含有1700多个图标,现在所有的图标都展示出来!
Coolite Toolkit介绍 Coolite Toolkit 是一个支持ASP.NET AJAX的Web控件。 Coolite Toolkit是基于跨浏览器的ExtJS 库开发而来的,并且简化了开发步骤,并且包含有丰富的Ajax运用。 Coolite Toolkit和ExtJS 都是...
自己制作的Coolite学习文档,并且每一个都有对应的C#和asp.net实例源码。
Coolite Toolkit Professional v0.8.2.rar
Coolite ExtJs Coolite 1.0 Preview 加 Example源码 Example源码比较难找 版本是 1.0.0.34580
使用coolite才发现做漂亮的系统界面易如反掌!
很好的extjs控件,适合asp.net开发,源码可以根据需要进行修改,项目使用时只需引用Coolite.Examples/bin目录下面的两个dll文件(Coolite.Ext.UX.dll和Coolite.Ext.Web.dll)即可。
辛苦搜集的coolite内置图标给大家分享!
正式版以发布,请到官方下载 http://www.coolite.com/download/ Demo可以到这下载 http://download.csdn.net/source/912868(正式版)