PDA

View Full Version : filtering multiple values from grid



zeeshanjeelani
27 Apr 2013, 2:52 PM
Hi

I am trying to filter dates and a value from grid panel but its not working




hstore=Ext.ComponentQuery.query('#addHolidayGrid')[0].store;hstore.filter([Ext.create('Ext.util.Filter', {filterFn: function(item) {return item.get("startdate") >=startdate; }, root: 'data'})
, Ext.create('Ext.util.Filter', {filterFn: function(item) { return item.get("enddate") >=enddate; }, root: 'data'})
]);

slemmon
29 Apr 2013, 4:10 PM
If you're trying to build a filter that evaluates two values in the record you might try passing in a single filter instance using filterFn.
http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.util.Filter-cfg-filterFn