I'm using gxt 3.0.1 and I have Basic Grid added on my form. Now I've added filter for each column which can be used over TextBox in menu of grid columns (basically it's Filter Grid now). I have to make my own TextBox above grid and apply filter to it. And do that for each column of grid. Filtering is done locally. My idea was to look for code they made for their TextBox and apply it on mine TextBox. But I failed. It should be just String filter, which should work exactly as filter provided in Filter Grid. Also I'm using UiBinder.
1 Answers
1
votes
From the GridFilters
javadoc
* Filtering is adjusted by the user using the grid's column header menu (this
* menu can be disabled through configuration). Through this menu users can
* configure, enable, and disable filters for each column.
This is meant to be used to configure column header menus to have filters built in, not set up text boxes outside of the grid - see http://www.sencha.com/examples/#ExamplePlace:filtergrid for how this is intended to work.
To build the way you are describing, start instead with making a StoreFilter
object based on the contents of the TextBox
, adding it to the store, and re-applying the filter each time the contents of the text box change.
Check out StoreFilterField
for a working example, or follow the above instructions to build your own.
If this doesn't work, please provide a code sample in your question...
GridFilters<Stock> filters = new GridFilters<Stock>(); filters.initPlugin(grid); filters.setLocal(true); filters.addFilter(nameFilter);
now what happens later is mystery to me. – user2061807