错误信息为:TypeError: record.get is not a function
custCardCode.setValue(record.get(‘custCardCode‘));
items : [{ xtype : ‘button‘, text : ‘确定‘, listeners : { ‘click‘:function(){ var grid = Ext.getCmp(‘custCardCode-grid‘); var record = grid.getSelectionModel().getSelection(); if(record.length == 0){ Ext.Msg.alert(‘提示‘, ‘请选择一条记录!‘); return; } var custCardCode = Ext.getCmp(me.custCardCodeId); if(custCardCode){ custCardCode.setValue(record.get(‘custCardCode‘)); //提示错误处
//解决方法 custCardCode.setValue(record[0].get(‘custCardCode‘)); } me.close(); } } }]
TypeError: record.get is not a function,布布扣,bubuko.com
TypeError: record.get is not a function
原文:http://www.cnblogs.com/currently/p/3926961.html