PDA

View Full Version : [3.3.1]Ext.grid.GridView -> beforerefresh-event



tobiu
23 Feb 2011, 1:55 AM
hi team,

this is more a feature-request than a bug, but it is at least inconsistent to the beforeload-event of the store. there you can return false to prevent the store from loading.

so, a chance to stop the view from refreshing would also be really helpful in some cases.

something like:



Ext.override(Ext.grid.GridView, {
refresh : function(headersToo) {
if (this.fireEvent('beforerefresh', this) === false)return;
this.grid.stopEditing(true);

var result = this.renderBody();
this.mainBody.update(result).setWidth(this.getTotalWidth());
if (headersToo === true) {
this.updateHeaders();
this.updateHeaderSortState();
}
this.processRows(0, true);
this.layout();
this.applyEmptyText();
this.fireEvent('refresh', this);
}
});



best regards
tobiu

tobiu
23 Feb 2011, 2:33 AM
well, this is more complicated, since even with stopping the refresh, there are calls that try to access the view:



Ext.fly(this.getRow(row)) is null
[Break On This Error] return Ext.fly(this.getRow(row)).query(this.cellSelector)[col];