PDA

View Full Version : StoreFilterField by multiple fields



paserrano
23 Nov 2009, 7:46 AM
Hi to all

I am working with grids, and I would like to add a field which allows me find data, like this example made with js:

http://gridsearch.extjs.eu/

My problem is that I don't know how to add or delete fields through the fields to search, like in the example: you have selected the field "price" and you search by this field, if you select another field you can search by both fields...I know how create by one field, through this class:

StoreFilterField<Patient> filter = new StoreFilterField<Patient>() {
@Override
protected boolean doSelect(Store<Patient> store, Patient parent,Patient record, String property, String filter) {
String name = parent.get(nameColumn);
name = name.toLowerCase();
if (name.indexOf(filter.toLowerCase()) != -1) {
return true;
}
return false;
}
};


but, How can I modify this filter when an user add another field in the search?

thanks a lot