ExtJS6 treegrid 一次加載数据后,点击展开仍然会从服务器取数据
2018-01-04 17:51
453 查看
Ext.create("Ext.tree.Panel", { flex: 1, store: { type: 'tree', fields: ['d_name', 'parentid', 'parentname', 'd_type', 'd_icon', 'd_fuzeren', 'd_tel', 'd_fax', 'd_add', 'd_email', 'd_miaoshu', 'd_order', 'isDelete', 'Delete_time', 'DeviceId'], proxy: { type: 'ajax', url: '/data/hr_department.ashx?Action=treegrid', reader: { type: 'json',rootProperty: 'Rows',idProperty: 'id' } } }, id: 'depTreeGrid', useArrows: true, rootVisible: false, multiSelect: false, singleExpand: false, columns: [{ xtype: 'treecolumn', text: '门店名称', dataIndex: 'd_name', width: 180 }, { text: '负责人', dataIndex: 'd_fuzeren', width: 100 }, { text: '电话', dataIndex: 'd_tel', width: 100 }, { text: '邮箱', dataIndex: 'd_email', width: 100 }, { text: '传真', dataIndex: 'd_fax', width: 100 }, { text: '地址', dataIndex: 'd_add', width: 180 }, { text: '描述', dataIndex: 'd_miaoshu', width: 150 }, { text: '绑定设备', dataIndex: 'DeviceId', width: 150 }, { text: '排序', dataIndex: 'd_order', width: 100 }], listeners: { afterrender: function (pObj, eOpts) { AppCommon.toolbar(pObj, 21, []); } } });
去掉store的proxy配置中的红线部分,检查输出数据中子节点属性是否是children
相关文章推荐
- ExtJS 4.2 树形结构请求后台数据无法展示子节点,而是没点击一次请求一次数据,无限请求加载所有的父节点元素
- JS每点击一次添加多少条数据
- Extjs 中实现combox多选,已经解决了原有的bug 【选择多条记录后,鼠标点击其他空白处,选择的数据丢失,】
- [j2ee]网站被访问次数的实现(一个ip一天只计算一次,且服务器重启后访问记录仍然存在)
- iOS TextView 中的文字 点击一次全部展开, 在点击一次 显示原有大小。
- 【ExtJS实践】之一 :TreeGrid异步加载数据
- 一次难忘的服务器数据拯救
- ExtJs3.2和ExtJs3.0在reload时的区别(点击左边树的节点时右边表格中的数据是否同步的问题)
- 一次获取数据库服务器所有数据文件的大小
- 关于treegrid及tree点击文字展开或关闭
- 采用浏览器端操作减小服务器负担——数据批量录入一次提交
- ExtJs模拟服务器数据来源
- 在可编辑表格EditorGrid中,我选择一行已输入的数据,点击删除按钮,该行数据将被删除,然后当我点击表单提交按钮时,已经被删除的那一行数据仍然被插入数据库中
- easyui treegrid 动态展开数据(暂记)
- extjs 3.x简单的异步树 并实现展开时重新加载数据的实现
- 如何使tomcat服务器重新启动后仍然保留当前用户的会话和数据
- 有关于用javaScript点击一次提交数据却发送了两次或者多次的问题
- (原创)如何让web页面产生服务器数据返回后仍然能够保留到用户输入的位置!
- 在可编辑表格EditorGrid中,我选择一行已输入的数据,点击删除按钮,该行数据将被删除,然后当我点击表单提交按钮时,已经被删除的那一行数据仍然被插入数据库中