extjs tree check 级联选择
来源:互联网 发布:centos和redhat哪个好 编辑:程序博客网 时间:2024/05/17 00:12
extjs4 tree check 级联选择
实现效果:
关键代码:
function changeAllNode(node, isCheck) { allChild(node, isCheck); allParent(node, isCheck); function allChild(nodec, isCheckc) { var chileNodes = nodec.childNodes; Ext.Array.each(chileNodes, function (nd) { if (nd.hasChildNodes()) { nd.set('checked', isCheck); allChild(nd, isCheckc); } else { nd.set('checked', isCheck); } }); }function allParent(nodep, isCheckp) { if (!isCheckp) { nodep.set('checked', isCheck); if (brothNodesIsTrue(nodep)) { } else { if (nodep.getDepth() > 1) { allParent(nodep.parentNode, isCheckp); } } } else { if (nodep.getDepth() > 1) { nodep.set('checked', isCheck); allParent(nodep.parentNode, isCheckp); } else { nodep.set('checked', isCheck); } } }function brothNodesIsTrue(node) { var flag = false; var brothNodes = node.parentNode.childNodes; Ext.Array.each(brothNodes, function (bn) { if (bn.get('checked')) { flag = true; return false; } }); return flag; }}
监听选择事件:
tree.on('checkchange', function (node, checked) { changeAllNode(node, checked) });
3 0
- extjs tree check 级联选择
- 【非常实用】EXTJS TREE 上下级级联选择扩展方法
- ExtJS 复选框的tree 结点的级联选择
- ExtJs 省市级联选择代码
- 可级联选择tree中的checkBox (flex)
- ext 4 check tree 联动选择
- extjs中 combobox级联
- extjs Combobox级联
- extjs 级联下拉菜单
- extjs treePanel checkBox级联
- extjs的级联展开
- ExtJS Tree刷新后自动展开并选择节点
- ExtJS学习笔记(十一) Tree的父子级联动选定,和自定义半选状态
- extjs tree
- ExtJS Tree
- ExtJS.Tree
- Ext JS4百强应用: combobox+tree下拉树 支持单选多选级联选择 --第7强
- tree级联联动
- 算法——任意进制转换
- 中测康苑——企业文化
- 兰溪用友软件,兰溪用友财务软件,兰溪用友进销存,兰溪0A,兰溪HR,兰溪ERP,兰溪PDM,兰溪CRM,兰溪PLM,兰溪U8,兰溪U9,兰溪NC,兰溪T+,兰溪BQ,兰溪T3,兰溪T6,兰溪用友年度结
- java繁体简体中文转换
- UVa 11121 - Base -2 负进制的转化和推广
- extjs tree check 级联选择
- OCP 1Z0 052 4
- spring中bean的scope解析
- jquery触发A的点击问题
- 如何执行hbase 的mapreduce job
- 1:java基本数据类型
- magento产品数据库表结构分析[magento二次开发]
- oracle 下操作blob字段是否会产生大量redo
- cocos2dx --- Widget 加载 CCNode