21 Feb 2013 4:49 AM #1
ExtJs 4.0 dynamically change store for grid
I decided to write on forum question, because there are a lot of answers about my issue, but nothing helped to resolve my problem. I am wondering between difference of functions in ExtJS 4.0 lib and ExtJs 4.1.
Initially I dreamed to add column dynamically with it's own store. I left this idea, when I recognized that it is imposible - I tried to change directFn param to store's proxy on fly. Also nothing works. Error "Uncaught TypeError: Cannot read property 'directCfg' of undefined" happens . Then I tried to resolve it, but example code was so dirty and not exact, that I left this idea. Now I am writing here.
So who knows how to load to dynamically added column with dynamic data?
Here is my code. Column adds perfectly, but data loading failed.
21 Feb 2013 5:06 AM #2
I left already existing directCfg, only change name of executed function.
CurrGrid.getStore().proxy.directFn.directCfg.method.name = "cache_price"; this_window.down('#the_grid').store.load();