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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -