I am using extjs version 3.4 and I am getting one error in this line:
var query = new RegExp(Ext.String.format('field1', e.query.replace(/\?/g, '[A-Za-z0-9]')));
like--Uncaught TypeError: Cannot call method 'format' of undefined
I added listener like this please let me know if there is any wrong in this.
this.findById('field1').addListener({
beforequery: function (e) {
if (e.query && e.query.indexOf('?') != -1) {
e.cancel = true;
var query = new RegExp(Ext.String.format('field1', e.query.replace(/\?/g, '[A-Za-z0-9]')));
this.expand();
this.store.clearFilter(true);
this.store.filter(this.displayField, query);
}
}
});