-
18 Nov 2008 11:56 AM #1
[2.0+][CLOSED]GridPanel.reconfigure can invalidate certain configs
[2.0+][CLOSED]GridPanel.reconfigure can invalidate certain configs
After reconfigure, certain existing configurations may become in valid and cause errors.
One such is autoExpandColumn. The Grid might be reconfigured so that the specified column does not exist which causes a runtime error when the View tries to auto expand column index -1.
The fix for this one:
Code:reconfigure : function(store, colModel){ if(this.loadMask){ this.loadMask.destroy(); this.loadMask = new Ext.LoadMask(this.bwrap, Ext.apply({store:store}, this.initialConfig.loadMask)); } this.view.bind(store, colModel); this.store = store; this.colModel = colModel; if (this.autoExpandColumn && (this.colModel.getIndexById(this.autoExpandColumn) == -1)) { delete this.autoExpandColumn; } if(this.rendered){ this.view.refresh(true); } },Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
18 Nov 2008 1:06 PM #2
Along with reconfiguring, you would need to also update any settings that you set. Ext can't guess what settings you have set and which are invalid. Another example would be a listener that listens for a particular event by column, only that column no longer exists. Ext can't fix that either. This wouldn't be a bug in Ext, it would be a bug in the underlying application code.
-
19 Nov 2008 12:28 AM #3
OK, maybe we need a reconfigure event then. Because If you look at where that code is necessary, it has to be executed before the refresh.
Some extra resetting functionality has to be injected before the refresh takes place. It must go there because all sorts of things can change. GridFilters (or other plugins) may need to be unbound from the Store and Grid, PagintToolbars need to be unbound and rebound etc.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642


Reply With Quote