ExtJs 5 grid store/viewmodel binding: Cannot modify ext-empty-store

放肆的年华 提交于 2019-12-06 06:27:53

I got the same issue in afterRender event and solved it by not getting the store from the grid like

grid.store.load();

but from the ViewModel (ViewController scope):

this.getViewModel().getStore('{warteliste}').load();

Check if the store is created as expected in viewmodel. Normally, we do not have store definition files in ./store directory but we place their configurations in viewmodel.

See an example of that here: http://extjs.eu/ext-examples/#bind-grid-form - MainModel::stores

The solution to your original problem

I need different filtered versions of the store in different grids

are chained stores.

See an example of how to implement them here: http://extjs.eu/on-chained-stores/

for me it was

myGrid.getViewModel().getStore('myStoreName').load();
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!