PDA

View Full Version : Extjs grid fitlers custom fire filterUpdate on delay



kguha
10 Mar 2011, 7:37 AM
In GridFilters.js, there is an event handler like this:

onStateChange : function (event, filter) {
......
if ((this.autoReload || this.local) && !this.applyingState) {
this.deferredUpdate.delay(this.updateBuffer);
}
....
this.grid.fireEvent('filterupdate', this, filter);
}

I wish to add the `fireEvent('filterupdate')` inside a `(Ext.util.delayedTask)` similar to reload. And instead of `this.grid.fireEvent('filterupdate', this, filter),` I wish to do:

this.somedeferredUpdate.delay(this.updateBuffer);

I am not sure how to go about this? I tried putting inside the contructor something like:

this.somedeferredUpdate = new Ext.util.DelayedTask(this.grid.fireEvent('filterupdate', this, filter), this);

But that did not work.

dresses
10 Mar 2011, 10:15 PM
It is better to find professionals!