2016-12-20 94 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()*函数之前 –

相关问题