- 1、本文档共31页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
ExtJS中表格控件的使用,属性设置和数据的获取(国外英语资料)
ExtJS中表格控件的使用,属性设置和数据的获取
Brief introduction of tabular features in ExtJS
The table is defined by class Ext.grid.GridPanel, inherited from Ext.Panel, and xtype is grid
The column information of the table is defined by Ext.grid.ColumnModel
The data memory of the table is defined by Ext.data.Store. According to the difference of the analytic data, the data memory can be divided into the following several kinds:
JsonStore, SimpleStore, GroupingStore...
The basic preparation process of a table:
1, create table column model
Var cm = new Ext.grid.ColumnModel ({)
{header: role, dataIndex:role},
{header: rank, dataIndex:grade},
{header: dataIndex:createDate creation date, type:,date, renderer: (Ext.util.Format.dateRendererY M D April )} / / create date type data
});
2, creating a data array
Var data = [
[the soldiers,7,2011-07-2412:34:56],
10,2011-07-2412:34:56] [the generals,
];
3, create a data storage object store, contains two parts: proxy, the way to obtain data; reader, the way to parse data
The ArrayReader of mapping is used to set the order of columns
Var store = new Ext.data.Store ({)
Proxy: new Ext.data.MemoryProxy (data),
Reader: new Ext.data.ArrayReader ([{}.
{name:,role, mapping:, 1},
{name:,grade, mapping:, 0}
{name:createDate, mapping: 2, type:date, dateFormat:Y-m-dH:i:s} / / create date column and display format
])
});
Store.load ();
4, create GridPanel, assemble ColumnModel and store
Var grid = new Ext.grid.GridPanel ({)
RenderTo:grid,
Store: store,
Cm: cm
});
Also, you can use ScriptTagProxy for remote data, as shown below
Var store = new Ext.data.Store ({)
Proxy: new Ext.data.ScriptTagProxy ({)
Url:http://})..,
Reader: new Ext.data.ArrayReader ([{}.
{name:,role, mapping:, 1},
{name:,grade, mapping:, 0}
]),
SortInfo: {field: role direction: ASC} / / set the default row sequence, ASC/DESC
});
Table common attribute functions
Var grid = new Ext.grid.GridPanel ({)
EnableColumnMove: false, / / no drop column
EnableColumnResize: false, / / and never change the w
您可能关注的文档
- 2005渠道大变脸(国外英语资料).doc
- 2006--2007学年度高二年第一学期期中联考(国外英语资料).doc
- 2006年-2007年联考题(国外英语资料).doc
- 2006年4月国际经济法试题及答案(国外英语资料).doc
- 2006年下半年程序员上午试题(国外英语资料).doc
- 2006年教职工趣味运动会项目(国外英语资料).doc
- 2007中考二轮复习提优专题强化训练(国外英语资料).doc
- 2007中国大连国际工作船艇展览会(国外英语资料).doc
- 2007复旦大学系际辩论赛 (正方 恋爱靠勤奋 反方 恋爱靠缘分)太经典了(国外英语资料).doc
- 2007年一级建造师市政实务真题及答案(国外英语资料).doc
- (高清版)DB1301∕T 485-2023 生猪定点屠宰企业非洲猪瘟检测实验室建设规范.docx
- (高清版)DB1301∕T 487-2023 设施樱桃番茄基质栽培技术规程.docx
- (高清版)DB1301∕T 486-2023 林下蛋鸡生态养殖技术规程.docx
- (高清版)DB1301∕T 507-2024 动物诊疗机构兽药管理规范.docx
- (高清版)DB1301∕T 456-2023 青海湖裸鲤淡水人工繁育技术规程.docx
- (高清版)DB62∕T 4850-2023 马铃薯品种 应发薯1号.docx
- (高清版)DB62∕T 4813-2023 小麦品种 灵台4号.docx
- (高清版)DB62∕T 4878-2024 国家公园自然资源资产价值评估技术规程.docx
- (高清版)DB1301∕T 505-2024 新生儿洗澡操作规程.docx
- (高清版)DB62∕T 4899-2024 梨品种 早玉.docx
最近下载
- 2024年广东省中考英语试题(含听力音频和答案).docx VIP
- 公务员制度导论-孙德超-第4章 公务员分类管理制度.ppt VIP
- 五年级下册数学应用易错题.docx VIP
- 智慧税务服务综合管理系统方案.docx VIP
- 公务员制度导论-孙德超-第5章 公务员录用制度.ppt VIP
- 运营车辆停运费诉状范文范例.docx VIP
- 2024江苏省句容市《质量员之设备安装质量基础知识》资格考试必背200题完整题库(基础题).docx VIP
- 玩转手机银行APP.doc VIP
- 纳米材料与纳米技术 课件全套 第1--7章 纳米材料的结构单元---先进纳米加工技术.pptx
- 网约车停运费诉状模板范文范例.docx VIP
文档评论(0)