- 6
- 0
- 约1.1万字
- 约 12页
- 2017-06-12 发布于北京
- 举报
Extjs4.2 Grid单元格编辑
效果图:
实现代码:
TcodeoneRowView.js
/**
* @Description 代码生成器-单表-行编辑模式 视图层
* @author 张川(c163.com)
* @date 2014-01-13 11:22:12
*/
Ext.define(zc.createView(test.TcodeoneRowView),{
extend : Ext.panel.Panel,
alias : widget.view_test_TcodeoneRowView,//视图别名
layout : border,
border : 0,
items : [{
region : north,
xtype : panel,
height : 0,
border : 0,
items : [{
xtype : hiddenfield,
id : view_test_TcodeoneRowView_tbar_storeCount
}]
},{
region : center,
xtype : gridpanel,
layout : fit,
border : 0,
forceFit : true,//自动填充单元格
selType : checkboxmodel,//多选框模式
columns : [{
dataIndex : id
,text : 编号
,width : 100
,align : center
,sortable : false
,hidden : true
,hideable : false
},{
dataIndex : name
,text : 姓名
,width : 100
,align : center
,sortable : false
,editor : {
xtype : textfield
}
},{
dataIndex : birthday
,text : 出生日期
,width : 100
,align : center
,sortable : false
,renderer : Ext.util.Format.dateRenderer(Y-m-d)
,editor : {
xtype : datefield
,format : Y-m-d
}
},{
dataIndex : status
,text : 状态
,width : 100
,align : center
,sortable : false
,renderer:function(value,metaData,record,rowIndex,columnIndex,stroe,view){
var result = ;
if(value == 1){
result = span style=color:green启用/span;
}
else if(value == 0){
result = span style=color:gray禁用/span;
}
return result;
}
,editor : {
xtype : view_test_TcodeoneRowStatusView
}
}],
store : test.TcodeoneRowStore
}],
initComponent : function(){
var listObj = this.items[1];
listObj.dockedItems = [{
xtype : Ext.widget(zc_grid_Toolbar,{//工具栏
params : {
initialism : test_TcodeoneRow,
btnSearchg : true,
btnSaveCancel : true
}
})
},{
xtype : pagingtoolbar, //分页栏
dock : bottom,
displayInfo : true,
plugins : Ext.create(Ext.ux.ProgressBarPager),// 分页进度条
pageSize : 25,
stor
您可能关注的文档
最近下载
- 2026年信访文员考试题库及答案解析.docx VIP
- 义务教育语文课程标准日常修订版2022年版2025年修订解读PPT课件.doc VIP
- 人教版(2024)物理八年级下册9.2液体的压强课件(共46张ppt).pptx VIP
- 部编版四年级下册语文《黄继光》教学教案.doc VIP
- GB 6441-2025 《生产安全事故分类与编码》 标准解读.pptx
- 儿科临床营养支持管理详解.ppt VIP
- 上瘾式学习指南.doc VIP
- DZT 0130-2006 地质矿产实验室质量管理规范(1-16部分全).pdf VIP
- # 义务教育语文课程标准日常修订版2022年版2025年修订解读PPT课件.pptx VIP
- 2025辽宁铁道职业技术学院单招《数学》真题含完整答案详解(名师系列).docx VIP
原创力文档

文档评论(0)