zoukankan      html  css  js  c++  java
  • extjs 树前面的多选框选中状态修改

    在treepanel的事件中添加:

     1                    listeners: {
     2                            
     3 //                            itemdbclick:{                            
     4 //                                fn: function(view, record, item, index, e,obj){
     5 //                                    alert('dbclick');e.stopEvent;
     6 //                                },
     7 //                                scope: this
     8 //                            }
     9 //                            ,
    10 //                             itemclick: {
    11 //                                    fn: function(view, record, item, index, e,obj){
    12 //                                            alert(record.data.id+':'+record.data.text);
    13 //                                            e.stopEvent;
    14 //                                        },
    15 //                                    scope: this
    16 //                            },
    17                             checkchange: {
    18                                 fn: function(node,checked,obj) {
    19 
    20                                       if(checked)
    21                                       {
    22                                           var pNode = node.parentNode;
    23                                           for(;pNode!=null;pNode=pNode.parentNode)
    24                                           {
    25                                             pNode.set('checked',checked);
    26                                           }
    27                                       }
    28 
    29                                       if(node.childNodes.length>0)
    30                                       {
    31                                          node.cascade(function(node){
    32                                             node.set('checked',checked);
    33                                          });
    34                                       }
    35 
    36                                 }
    37                             }
  • 相关阅读:
    移动硬盘无法识别提示需要格式化的解决办法
    Cassandra 入门(资料收集)
    [转] NoSQL生态系统
    软件项目实施问题收集(LastUpdatedOn:20141117)
    Sql server 收缩日志
    关于重构需要了解的一些原则
    C#定时任务采用线程和队列实现
    [转]我是如何带领团队开发项目的
    ASP.NET MVC 多套皮肤解决方案
    Mysql 问题汇总(不断更新中...)
  • 原文地址:https://www.cnblogs.com/baishahe/p/2514984.html
Copyright © 2011-2022 走看看