2016-12-20 46 views
2

我想在storeLoad()後在ExtJS網格中激發一個事件。除了渲染之後,是否有任何事件可以使用?ExtJs在存儲加載後的事件

afterrender: function(grid) { 
      var store = grid.getStore(); 
      if (store.isLoaded()) { 
       // not getting debugger here. 
      } 
     }, 

回答

3

只需使用load事件上你的店:

var store = grid.getStore(); 
store.on('load', function(){ 
    //Your function here 
}); 
+0

謝謝回答。但我應該在哪裏做這個? IN初始化函數或後處理函數 – David

+0

@David在* afterrender *函數應該沒事 –

+0

@David或者如果您的商店有* autoload *設置爲* false *,就在您調用* load()*函數之前 –

相關問題