ExtJS 动态设置Grid列是否可编辑

Ext JS Library 2.2.1

正确:

var cm = Ext.getCmp(‘Grid').getColumnModel();
cm.setEditor(cm.findColumnIndex('TestColumn'), new Ext.grid.GridEditor(new Ext.form.NumberField({
                            allowBlank : false,
                            cls : 'required',
                            vtype:'precision',
                            minValue: 0,
                            maxValue: 999999999.999})));

错误:

var cm = Ext.getCmp(‘Grid').getColumnModel();
cm.setEditor(cm.findColumnIndex('TestColumn'), new Ext.form.NumberField({
                            allowBlank : false,
                            cls : 'required',
                            vtype:'precision',
                            minValue: 0,
                            maxValue: 999999999.999}));

不能按单元格设置Editor?

猜你喜欢

转载自blog.51cto.com/13685327/2160232