当前位置:编程学习 > JAVA >>

jquery easyui datagrid中使用combotree

各位大侠,小弟具体问题如下:
前端页面用的是jquery easyui,后台用的是spring+json.
有一个功能就用datagrid展示数据,并且其中有一例用的是combotree.
我的combotree要实现异步加载,比如可以用下面的方法,

onBeforeExpand:function(node){
     $('#cc').combotree("tree").tree("options").url= "treejson.aspxact=xx&pid=" + node.id;

现在的问题是我的这个方法是用在datagrid中的,我在datagrid中的columns中使用了editor,并制定它的类型是combotree.这样我在用上面的方法时,"#cc"是没有的,这种情况如何解决呢? --------------------编程问答-------------------- $('#cc')就是你定义中的ID <label for="org">组织机构</label>
<select id="cc" name="sysOrg.id" class="easyui-combotree" style="width:200px;"/>
<input id="orgId" name="orgId" type="hidden" value="$!{entity.sysOrg.id}"/>
     </p> --------------------编程问答-------------------- 除 --------------------编程问答-------------------- var editor = $grid.datagrid('getEditor', { index: index, field: 'unit' });
                var $combotree = $(editor.target);
                
                $combotree.combotree({
                    url: url + $.Guid.Empty(),
                    onBeforeSelect: function (node) {
                        if (!$(this).tree("isLeaf", node.target)) {
                            return false;
                        }
                    },
                    onClick: function (node) {
                        if (!$(this).tree('isLeaf', node.target)) {
                            $combotree.combo("showPanel");
                        }
                    },
                    onBeforeExpand: function (node) {
                        $(this).tree("options").url = url + node.id;
                    }
                }); --------------------编程问答-------------------- 居然不结贴。。。。。 --------------------编程问答-------------------- 想知道联系我。。。 --------------------编程问答-------------------- 请问楼主怎么解决的?
--------------------编程问答-------------------- 除
补充:Java ,  Web 开发
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,