PDA

View Full Version : onTriggerClear grid search clear



Natkeeran
1 Dec 2009, 9:13 AM
Hello All:

I am using the search plugin (http://gridsearch.extjs.eu/), the search is working fine.

However, when I click the x to clear the filter, it does not respond.

From the forums I know there exists: onTriggerClear.

I tried onTriggerClear: function (){..}, with no response.

How to simply clear the search or reload the original grid.

Thanks.

Regards,
Natkeeran

markw
15 Dec 2009, 5:05 PM
Same problem ... did you find a solution?

markw
15 Dec 2009, 5:30 PM
Found the solution in http://www.extjs.com/forum/showthread.php?p=286183

Locate Ext.ux.grid.Search.js

Replace lines 207-8

,onTrigger1Click:this.minChars ? Ext.emptyFn : this.onTriggerClear.createDelegate(this)
,onTrigger2Click:this.onTriggerSearch.createDelegate(this)With:

,onTrigger1Click:this.onTriggerClear.createDelegate(this)
,onTrigger2Click:this.minChars ? Ext.emptyFn : this.onTriggerSearch.createDelegate(this)Seems to now work fine.

Natkeeran
16 Dec 2009, 7:42 AM
Thank you. Your suggestion worked.