extjs rowedit update按钮不可用

时间:2014-05-09 10:31:24   收藏:0   阅读:411
重写
Ext.override(Ext.grid.RowEditor, { addFieldsForColumn : function(column, initial) { var me = this, i, length, field; if (Ext.isArray(column)) { for (i = 0, length = column.length; i < length; i++) { me.addFieldsForColumn(column[i], initial); } return; } if (column.getEditor) { field = column.getEditor(null, { xtype : ‘displayfield‘, getModelData : function() { return null; } }); if (column.align === ‘right‘) { field.fieldStyle = ‘text-align:right‘; } if (column.xtype === ‘actioncolumn‘) { field.fieldCls += ‘ ‘ + Ext.baseCSSPrefix+ ‘form-action-col-field‘; } if (me.isVisible() && me.context) { if (field.is(‘displayfield‘)) { me.renderColumnData(field, me.context.record,column); } else { field.suspendEvents(); field.setValue(me.context.record.get(column.dataIndex)); field.resumeEvents(); } } if (column.hidden) { me.onColumnHide(column); } else if (column.rendered && !initial) { me.onColumnShow(column); } // -- start edit me.mon(field, ‘change‘, me.onFieldChange, me); // -- end edit } } });

extjs rowedit update按钮不可用,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!