zoukankan      html  css  js  c++  java
  • TypeError: record.get is not a function

    错误信息为: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(); } } }]



  • 相关阅读:
    iframe
    go web
    go 算法与数据结构
    go redis
    go 网络编程
    go 并发编程
    go 序列化
    go 文件操作
    go 面向对象
    go 环境及4开发
  • 原文地址:https://www.cnblogs.com/currently/p/3926961.html
Copyright © 2011-2022 走看看