- 1
- 0
- 约9.74千字
- 约 23页
- 2018-04-13 发布于河南
- 举报
EXTJS-表格高级应用
var grid = new Ext.grid.GridPanel({ renderTo: grid, autoHeight: true, store: store, cm: cm, bbar: new Ext.PagingToolbar({ pageSize: 10, store: store, displayInfo: true, displayMsg: 显示第 {0} 条到 {1} 条记录,一共 {2} 条, emptyMsg: 没有记录 }) }); store.load(); 注意,一旦使用了分页条, store.load();就必须在构造表格之后进行执行,否则将不起作用,并且将分页条和数据源关联,从而实现与表格共享数据模型 后台分页 var store = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({url:‘page.jsp}), reader: new Ext.data.JsonReader({ totalProperty: totalProperty, root: root }, [ {name: id}, {name: name}, {name: descn} ]) }); var grid = new Ext.grid.GridPanel({ renderTo: grid, autoHeight: true, store: store, cm: cm, bbar: new Ext.PagingToolbar({ pageSize: 10, store: store, displayInfo: true, displayMsg: 显示第 {0} 条到 {1} 条记录,一共 {2} 条, emptyMsg: 没有记录 }) }); store.load({params:{start:0,limit:10}}); 后台代码 % String start = request.getParameter(start); String limit = request.getParameter(limit); try { int index = Integer.parseInt(start); int pageSize = Integer.parseInt(limit); String json = {totalProperty:100,root:[; for (int i = index; i pageSize + index; i++) { json += {id: + i + ,name:name + i + ,descn:descn + i + }; if (i != pageSize + index - 1) { json += ,; } } json += ]}; response.getWriter().write(json); } catch(Exception ex) { } % 当然,分页条也可以在顶部,呵呵。 var grid = new Ext.grid.GridPanel({ renderTo: grid, autoHeight: true, store: store, cm: cm, tbar: new Ext.PagingToolbar({ pageSize: 10, store: store, displayInfo: true, displayMsg: 显示第 {0} 条到 {1} 条记录,一共 {2} 条, emptyMsg: 没有记录 })
您可能关注的文档
- 应用统计分析第一章.ppt
- 视频自动转码调度中心.doc
- 期中考计算题.ppt
- 为什么选择英特尔处理器.doc
- 名校必备高考物理大纲(新课程)_内容形式程度.doc
- 虚拟机安装xp步骤.doc
- 模拟综合试卷5.doc
- 全国中小学“教学中的互联网搜索”优秀教学案例评选《一次函数》.doc
- 投资理财选修测验.ppt
- 南开大学2011年硕士研究生入学考试经济学原理试题.doc
- 2025年版汽车趋势报告 The 2025 EPA Automotive Trends Report.docx
- 2026年边缘计算开源平台EdgeX Foundry入门与二次开发.docx
- 2026年超声内镜放大内镜早癌诊断AI辅助识别系统临床评价.docx
- 2026年报废汽车回收与再制造逆向物流体系.docx
- 2026年产品碳足迹核算方法学:从摇篮到大门与从摇篮到坟墓.docx
- 2026年城乡要素平等交换双向流动政策创新试点申报材料.docx
- 2026年超导半导体接口电路架构与电平转换驱动器设计.docx
- 2026年财政贴息不再以再贷款支持为前提后的风险防范与合规要点.docx
- 2026年不动产信托登记试点政策对遗嘱信托支持.docx
- 2026年城乡有机废弃物协同处理技术方案.docx
最近下载
- 2025年唐山市路北区辅警(协警)招聘考试题库附答案解析.docx VIP
- 《4.2 大学之道》教案、导学案、同步练习(附教学设计).docx
- Unit 6 Birthdays Lesson 1(课件)-三年级英语上学期(人教新起点版).pptx VIP
- 初一初中语文现代文阅读理解专题训练含答案(完整打印版).pdf VIP
- Q321183 JH005-2020 JH先张法预应力超高强混凝土管桩.pdf VIP
- 2025年锦州师范高等专科学校单招职业适应性考试题库及答案参考.docx
- 年产300吨猕猴桃果酒的工厂设计.docx VIP
- 2024年广东省航道事务中心所属事业单位招聘考试真题.pdf VIP
- 点到为止、不得罪人的简短生活会相互批评意见100条.docx VIP
- 2025年演出经纪人紧急事件处理中的团队沟通与决策专题试卷及解析.pdf VIP
原创力文档

文档评论(0)