I created a gridfilter like this:
var filters = new Ext.ux.grid.GridFilters({filters: [
{type: 'string', dataIndex: 'ContactName'}
]});
I wish to override the buildquery method to provide custom logic.
When I do:
filters.buildQuery = function(filters){
alert(Ext.util.JSON.encode(this.store.baseParams.filterParams));
};
It works fine. But when I move the alert inside another function like this:
buildQuery1 : function(filters){
alert(Ext.util.JSON.encode(this.store.baseParams));
}
And call it like this:
filters.buildQuery = function(filters){
buildQuery1(filters);
};
The alert does not show. And I get this.store.baseParams is null or not an object.
I solved it like this:
AND:
Not sure why this works 🙂