PDA

View Full Version : EXTJS store filter from view



govindaswamym
14 Aug 2012, 12:59 PM
hi,
I have a store which fetches data with different category.

In my view i have the following code.
xtype: 'dataview',
tpl: '<tpl for="."><a href="{linkURL}" target="_blank">{linkName}</a></tpl>',
store: linkStore,
stripeRows: true


My store has the following data.
{"category":"help","linkName":"aaa","linkURL":"http://www.aaa.com"}
{"category":"FAQ","linkName":"bbb","linkURL":"http://www.bbb.com"}
{"category":"help","linkName":"ccc","linkURL":"http://www.ccc.com"}
{"category":"FAQ","linkName":"ddd","linkURL":"http://www.ddd.com"}
{"category":"help","linkName":"eee","linkURL":"http://www.eee.com"}

I want to add a filter condition in my view to show data belonging to particular category(say "help"). I need to add it in view because there is another place in my view where I show the data belonging to category "FAQ". But both are from the same JSON data. Please let me know how to add filters for store in view

vietits
14 Aug 2012, 3:50 PM
See this post http://www.sencha.com/forum/showthread.php?237215-Applying-filter-to-dtore-from-view