当前位置: 首页 > 工具软件 > COOLITE > 使用案例 >

coolite的一点东西

云啸
2023-12-01
  //if( Test_TreeNode(row[0].ToString()+"p",nodes))
                        //{ }

 

            private bool Test_TreeNode(string Node_Id,Coolite.Ext.Web.TreeNodeCollection nodes)
            {

                //用遍历找是否存在刚要添加的node 有则不添加
                bool isNew=true;
                foreach (AsyncTreeNode node in nodes)
                {
                    if (Node_Id == node.NodeID)
                    {
                        isNew = false;
                    }               
                }
                return isNew;
            }

 

 

    <script type="text/javascript">//javascript创建tree的node并向tree添加
        function nodeLoad(node) {
            if (node.firstChild==null) {//判断是否有子结点 有则不再加载
                Coolite.AjaxMethods.NodeLoad(node.id, {
                    success: function(result) {
                        var data = eval("(" + result + ")");
                        node.loadNodes(data);
                    },
                    failure: function(errorMsg) {
                        Ext.Msg.alert('Failure', errorMsg);
                    }
                });
            }
            else {return;
            }
        }

 

原文:http://hi.baidu.com/shuijingwld9/blog/item/5e3944fa3fd69b6c034f561f.html

转载于:https://www.cnblogs.com/AndySong/archive/2009/11/01/1593793.html

 类似资料: