Extjs4.2Grid单元格编辑.docVIP

  • 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

文档评论(0)

1亿VIP精品文档

相关文档