Mis.Ext.CrudPanel=Ext.extend(Ext.Panel,{
 refresh:function()
    {
     alert(1);
    },  
 initComponent : function(){  
       this.cm.defaultSortable=true;   
       this.sm = new Ext.grid.CheckboxSelectionModel();
        Mis.Ext.CrudPanel.superclass.initComponent.call(this);
        var viewConfig=Ext.apply({forceFit:true},this.gridViewConfig);  
        this.grid=new Ext.grid.GridPanel({
        store: this.store,
        cm: this.cm,
        sm:this.sm,
        listeners :{
                cellclick:function()
                       {
                         这里该如何调用refresh方法
                      }
                }
    });   

        }
}

解决方案 »

  1.   

    如果说是refresh 方法,用 store.reload(),但你在单元格的单击事件中 refresh 是要做什么
      

  2.   

    Mis.Ext.CrudPanel=Ext.extend(Ext.Panel,{
     refresh:function()
      {
      alert(1);
      },   
     initComponent : function(){   
      this.cm.defaultSortable=true;   
      this.sm = new Ext.grid.CheckboxSelectionModel();
      Mis.Ext.CrudPanel.superclass.initComponent.call(this);
      var viewConfig=Ext.apply({forceFit:true},this.gridViewConfig);   
      this.grid=new Ext.grid.GridPanel({
      store: this.store,
      cm: this.cm,
      sm:this.sm,
      listeners :{
      scope:this,
      cellclick:function()
      {
         this.refresh();
         这里该如何调用refresh方法
      }
      }
      });     }
    }
      

  3.   

        原来如此,我之前把scope这句话写在cellclick里面了。。谢谢啦