PDA

View Full Version : filterby for ArrayStore



invader89
30 Dec 2011, 12:24 AM
Hi everyone.
I've been working with Extjs 3.xx for a few month and have a problem.
So for example I have array store:
var store_wiz_trip_grid = new Ext.data.ArrayStore({
fields : ['id','s_id','pos_point', 'name', 'time_coming', 'time_deviation_coming', 'time_start', 'time_deviation_start', 'lat','lng' ]
});

So I need to filter this store and find all records where pos_point between 2 values (whick I get from another 2 fields in form).
Before I had used simple filter for finding string, but here I need to write my own function. I've tried but...nothing.
Could someone help me?The problem actually with creating function for thread and calling that. I've seen examples...but can't write own

mitchellsimoens
30 Dec 2011, 8:16 AM
So what happens when you try to use filterBy?


store.filterBy(function(record) {
/*....*/
return true;
});