View Full Version : Store local filtering not working

20 Sep 2010, 11:12 PM

I have an store:

var ds_linies = new Ext.data.Store({
url: 'getliniesperoperador',
reader: new Ext.data.XmlReader({
record: 'linia',
id: 'id'
}, ['id','label','nombre','operador'])
,autoLoad: false
That I'm trying to filter locally. The default parameters of the filter method are(according to the API):

anyMatch : true, //optional, defaults to true
caseSensitive: true //optional, defaults to trueBut It doesn't matter what I do with those parameters, It always shows the same result, always anyMatch seems to be set to true.

ds_linies.filter('operador',1,false, false);The above code always return those records with the 'operador' field starting with '1', but according to the documentation It should return only the records with 'operador' field = '1'.

I also tried using regular expressions in the 'value' parameter, but I couldn't make it work, probably due to my lack of regular expressions skills (I tried something like

ds_lines.filter('operador','/^1$/')but It didn't worked.

Any help would be appreciated. Thank you