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!

  • 相关阅读:
    oracle sql语句
    Block
    Bug调试
    Xcode 项目文件介绍
    Mac终端命令
    Objective-C命名编写规范
    2014-07-23 .NET实现微信公众号接入
    2014-07-22 如何成为一名合格的职业人士
    3、C# 文件处理工具集
    2、C# 编码/加密工具集
  • 原文地址:https://www.cnblogs.com/shen119/p/3293032.html
Copyright © 2011-2022 走看看