zoukankan      html  css  js  c++  java
  • extjs 递归获取指定条件的record

    var nodes=treestore.getRootNode().childNodes;
                            function addFirstCls(nodes){
                                if(nodes.length){
                                    Ext.Array.forEach(nodes,function(item,index,array){
                                        if(!item.isLeaf()){
                                            addFirstCls(item.childNodes,"approve");
                                        }else{
                                            if(item.data["ApproveState"]=="Y"){
                                                console.log(item);
                                            }
                                        }
                                    });
                                }
                            }
                            addFirstCls(nodes);

    获取指定条件为item.data["ApproveState"]=="Y" 的记录,本为了找到treeview指定的row 和cell,却如此痛苦,找了一天都为成功!,真不明白为何在此处

    用view.getNode(model,true)却无法返回node对象,搞不懂!,还有对treeviewcolumn的如何获取当前列也是头痛,view.getNode(rowIndex)返回却是需要的父行。oh! shit!

  • 相关阅读:
    json server服务器
    Vue中父子组件通讯——组件todolist
    Vue基础语法
    mac双系统下ubuntu卡在开机密码登录界面卡死
    GBK转UTF8
    Geek/Git中文怎么读
    Javascript正则表达入参是null
    【MySQL】解决You can't specify target table 'user_cut_record_0413' for update in FROM clause
    aglio报错解决
    Sublime美化配置
  • 原文地址:https://www.cnblogs.com/shen119/p/3293032.html
Copyright © 2011-2022 走看看