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                             }
  • 相关阅读:
    [AT2064] [agc005_f] Many Easy Problems
    [AT2304] [agc010_c] Cleaning
    [AT2172] [agc007_e] Shik and Travel
    [AT2148] [arc063_c] Integers on a Tree
    [AT2363] [agc012_c] Tautonym Puzzle
    未能从程序集“netstandard, Version=2.0.0.0......”中加载类型“...”。
    Android Studio设置国内镜像代理
    新建一个浏览器APP
    Android Studio在Make Project时下载Grandle特别慢
    用JS添加和删除class类名
  • 原文地址:https://www.cnblogs.com/baishahe/p/2514984.html
Copyright © 2011-2022 走看看