tags:

views:

13

answers:

1

Hi,

I am using a grid with a Grid Search plugin (http://extjs.eu/docs/?class=Ext.ux.grid.Search)

I keep hiding and showing this grid every time the user press a button. I would like to reset the search field of the plugin every time the grid is displayed. What happens now is that the user clicks, the grid is shown and the user can search for something. The problem is that next time the user will click to make the grid visible, the search text will be the same as the old one, with the corresponding filter applied to the store.

Any hint about how to do that?

Best regards

A: 

I can actually answer myself here. You basically need to set the value of the field to '' and call a method to start the search

search.field.setValue(''); search.onTriggerSearch();

where search is defined like:

var search = new Ext.ux.grid.Search({...});

Danilo