jquery easyui easyui-treegrid 使用异步加载数据
2015-12-22 11:50
387 查看
jquery easyui easyui-treegrid 使用异步加载数据
jquery easyui easyui-treegrid 异步请求
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2015年12月22日 11:46:02 星期二
http://fanshuyao.iteye.com/
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2015年12月22日 11:46:02 星期二
http://fanshuyao.iteye.com/
jquery easyui easyui-treegrid 异步请求
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2015年12月22日 11:46:02 星期二
http://fanshuyao.iteye.com/
<table id="select" class="easyui-treegrid" style="width:100%;min-height:550px;height: 95%;" data-options=" iconCls: 'icon-ok', animate: false, collapsible: false, fitColumns: true, singleSelect: true, url: '${pageContext.request.contextPath}/backend/getOrgs.do?enableFlag=Y', method: 'post', idField: 'orgId', treeField: 'orgName', onBeforeExpand: function(row){ appendTree(row); }, onClickRow: function(row){ getUsers(); } "> <thead> <tr> <th field="orgName" width="150">组织名称</th> <!-- <th field="orgShotName" width="100">组织简称</th> --> </tr> </thead> </table>
function appendTree(row){ $.getJSON(basePath+'/backend/getOrgs.do?time='+decodeURI(''+new Date()), { enableFlag: 'Y', parentOrgId: row.orgId }, function(json){ if(json.rows[0]){ var childrenNodes = $('#select').treegrid('getChildren',row.id); for(var i=0; i<childrenNodes.length; i++){ var childrenNode = childrenNodes[i]; if($('#select').treegrid('find',childrenNode.id) != null){ $('#select').treegrid('remove',childrenNode.id);//移除 } } $('#select').treegrid('append',{ parent: row.orgId, data: json.rows }); } }); };
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2015年12月22日 11:46:02 星期二
http://fanshuyao.iteye.com/
相关文章推荐
- 【jQuery】URL操作函数
- 静下心来学jquery的用法
- <学习笔记> jQuery 国际化多语言
- 【jQuery】字符串操作函数trim
- 【jQuery】检测两个节点的包含关系
- 【jQuery】检测对象是否为原始对象
- jQuery插件开发全解析
- 【jQuery】检测对象是否为空
- 【jQuery】检测浏览器是否属于W3C盒子模型
- 【jQuery】获取浏览器的名称与版本信息
- jQuery最简单的checkbox全选和取消全选
- jquery序列表单和对象
- JQuery 添加和删除class
- JQuery实现AJAX实例
- 教你怎么写jQuery的插件
- Jquery基础知识
- jQuery选择器总结
- jQuery操作DOM对象
- jquery插件jquery.confirm弹出确认消息
- jQuery学习笔记(一)--基础的DOM和CSS操作