ExtJS 動態設置Grid列是否可編輯
阿新 • • 發佈:2018-08-15
min test var mode code orm field model get 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?
ExtJS 動態設置Grid列是否可編輯