全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
源代码:加载到页面中的js文件GridDoubleHeader.js/* author * since * description 双层表头* param* mtext 表头名 * param* mcol 向后跨越子表头个数* param* mwidth 上至下第一层表头的宽度,即父表头的宽度 * class MyGridView* extends Ext.grid.GridView*/MyGridView = Ext.extend(Ext.grid.GridView, renderHeaders : function() var cm = this.cm, ts = this.templates; var ct = ts.hcell, ct2 = ts.mhcell; var cb = , sb = , p = , mcb = ; for (var i = 0, len = cm.getColumnCount(); i len; i+) p.id = cm.getColumnId(i); p.value = cm.getColumnHeader(i) | ; p.style = this.getColumnStyle(i, true); if (cm.configi.align = right) p.istyle = padding-right:16px; cbcb.length = ct.apply(p); if (cm.configi.mtext) mcbmcb.length = ct2.apply( value : cm.configi.mtext, mcols : cm.configi.mcol, mwidth : cm.configi.mwidth ); var s = ts.header.apply( cells : cb.join(), tstyle : width: + this.getTotalWidth() + ;, mergecells : mcb.join() ); return s; );viewConfig = templates : header : new Ext.Template( , mergecells + cells , ), mhcell : new Ext.Template( value, ) ;/* author * since * description 双层表头* param* mtext 表头名 * param* mcol 向后跨越子表头个数* param* mwidth 上至下第一层表头的宽度,即父表头的宽度 * class MyGridView* extends Ext.grid.GridView*/MyGridView = Ext.extend(Ext.grid.GridView, renderHeaders : function() var cm = this.cm, ts = this.templates; var ct = ts.hcell, ct2 = ts.mhcell; var cb = , sb = , p = , mcb = ; for (var i = 0, len = cm.getColumnCount(); i len; i+) p.id = cm.getColumnId(i); p.value = cm.getColumnHeader(i) | ; p.style = this.getColumnStyle(i, true); if (cm.configi.align = right) p.istyle = padding-right:16px; cbcb.length = ct.apply(p); if (cm.configi.mtext) mcbmcb.length = ct2.apply( value : cm.configi.mtext, mcols : cm.configi.mcol, mwidth : cm.configi.mwidth ); var s = ts.header.apply( cells : cb.join(), tstyle : width: + this.getTotalWidth() + ;, mergecells : mcb.join() ); return s; );viewConfig = templates : header : new Ext.Template( , mergecells + cells , ), mhcell : new Ext.Template( value, ) ;修改grid的cm配置var ldrk_cm = new Ext.grid.ColumnModel(new Ext.grid.RowNumberer(mtext : ,/ 给父表头取的名字mcol : 1,/ 包含了几列mwidth : 20,/ 子表头宽度width : 20,/ 被包含子表头的宽度,最好填写一下header : No.), mtext : 本地住址或,mcol : 1,mwidth : 190,width : 200,header : 管理单位,dataIndex : address, mtext : ,mcol : 1,mwidth : 80,width : 80,header : 姓名,sortable : true,dataIndex : name, mtext : 性,mcol : 1,mwidth : 30,width : 30,header : 别,sortable : true,dataIndex : sex, mtext : ,mcol : 1,mwidth : 80,width : 80,header : 出生年月,dataIndex : birthday, mtext : ,mcol : 1,mwidth : 80,width : 90,header : 结婚年月,dataIndex : marryDate, mtext : ,mcol : 1,mwidth : 100,width : 110,header : 流动方向,dataIndex : moveAspect, mtext : 流入人口填户籍地名流出人口填流向地名,mcol : 1,mwidth : 200,width : 200,header : 流入(出)地名,dataIndex : placename, mtext : 流入(出),mcol : 1,mwidth : 80,width : 80,header : 年月,dataIndex : moveDate, mtext : 离开或返回,mcol : 1,mwidth : 80,width : 80,header : 年月,dataIndex : comeDate, mtext : 流入(出)初期子女,mcol : 2,mwidth : 100,width : 50,header : 男,dataIndex : man, width : 50,header : 女,dataIndex : woman, mtext : 流入(出)初期避孕情况,mcol : 2,mwidth : 160,width : 80,header : 采取措施名称,dataIndex : measureName, width : 80,header : 起始年月,dataIndex : startDate, mtext : 流动人口婚育证明发验情况,mcol : 4,mwidth : 320,width : 80,header : 发证年月,dataIndex : certificateDate, width : 80,header : 查验年月,dataIndex : checkDate, width : 80,header : 查验结果,dataIndex : checkResult, width : 80,header : 证件编号,dataIndex : certificateNo);var ldrk_cm = new Ext.grid.ColumnModel(new Ext.grid.RowNumberer(mtext : ,/ 给父表头取的名字mcol : 1,/ 包含了几列mwidth : 20,/ 子表头宽度width : 20,/ 被包含子表头的宽度,最好填写一下header : No.), mtext : 本地住址或,mcol : 1,mwidth : 190,width : 200,header : 管理单位,dataIndex : address, mtext : ,mcol : 1,mwidth : 80,width : 80,header : 姓名,sortable : true,dataIndex : name, mtext : 性,mcol : 1,mwidth : 30,width : 30,header : 别,sortable : true,dataIndex : sex, mtext : ,mcol : 1,mwidth : 80,width : 80,header : 出生年月,dataIndex : birthday, mtext : ,mcol : 1,mwidth : 80,width : 90,header : 结婚年月,dataIndex : marryDate, mtext : ,mcol : 1,mwidth : 100,width : 110,header : 流动方向,dataIndex : moveAspect, mtext : 流入人口填户籍地名流出人口填流向地名,mcol : 1,mwidth : 200,width : 200,header : 流入(出)地名,dataIndex : placename, mtext : 流入(出),mcol : 1,mwidth : 80,width : 80,header : 年月,dataIndex : moveDate, mtext : 离开或返回,mcol : 1,mwidth : 80,width : 80,header : 年月,dataIndex : comeDate, mtext : 流入(出)初期子女,mcol : 2,mwidth : 100,width : 50,header : 男,dataIndex : man, width : 50,header : 女,dataIndex : woman, mtext : 流入(出)初期避孕情况,mcol : 2,mwidth : 160,width : 80,header : 采取措施名称,dataIndex : measureName, width : 80,header : 起始年月,dataIndex : startDate, mtext : 流动人口婚育证明发验情况,mcol : 4,mwidth : 320,width : 80,header : 发证年月,dataIndex : certifi
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- GB/T 47542-2026科技传播能力评估指南
- 2025年可持续时尚直播带货选品策略
- 2026心理咨询师重点习题真题及答案
- 2026年心理咨询师专业知识考试试题及答案解析
- 第3课 团团圆圆过中秋 第二课时 课件(内嵌视频)2025-2026学年道德与法治二年级上册统编版
- 2025年科技守护老年健康 养老院24小时AI监护机器人
- 2026年湖北省孝感市晋升中、初级专业技术职务水平能力测试(环境保护)复习题及答案
- 2026年湖北省工程专业职务水平能力测试(发酵)经典试题及答案
- 2026年河南专升本心理学真题考前冲刺练习
- 甲状腺功能亢进症放射性碘治疗专家共识
- 2023年重庆市中考化学试卷(A卷及解析)
- 大学生心理健康教育(江汉大学)智慧树知到答案章节测试2023年
- 食品添加剂的测定优秀课件
- 基因功能研究技术之基因敲除及基因编辑技术-课件
- 心血管急症的急救(进修)课件
- 水系锌离子电池市场分析报告-培训课件
- 示波器的原理和使用课件
- 完整版全套消防工程施工组织设计方案
- (完整版)220kV+SF6断路器结构及动作原理培训课件
- System and Process Training Course 300(Emptey return) V1.0
- 部编版小学二年级语文下册期末测试卷(含答案)
评论
0/150
提交评论