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!

  • 相关阅读:
    poj 3304 直线与线段相交
    poj 2318 叉积+二分
    AC自动机
    MySQL报错:Packets larger than max_allowed_packet are not allowed 的解决方案
    SCOPE_IDENTITY的作用
    Truncate table、Delete与Drop table的区别
    .Net Attribute特性
    vs2010 调试快捷键
    TFS和VSS的简单对比
    做网站用UTF-8还是GB2312 & 各国语言对应字符集
  • 原文地址:https://www.cnblogs.com/shen119/p/3293032.html
Copyright © 2011-2022 走看看