Store filter in sencha touch -
i have store having structure :
fields:[ 'title' ], data :[ { title:'abc' }, { title:'abc2' }, { title:'abc3' }, { title:'abc4' }, { title:'abc5' }, { title:'abc6' } ]
so when load store list populated 6 records. wanted filter store on button click wanted selected record out of 6 record can possible. provide me idea or working code. in advance.
to filter store based on title
ext.getstore('storeid').filter("title", "abc3");
to clear filter
ext.getstore('storeid').clearfilter();
see store filter doc
update
ext.getstore('storeid').filterby(function(record){ var title = record.get('title'); if(title == "abc" || title == "abc1" || title == "abc2") return record; });
Comments
Post a Comment