PDA

View Full Version : grid filtering



r6174
24 Sep 2013, 9:11 AM
hi i have an urgent requirement in which i have a grid and a search box (as shown in image) when the grid is loaded for first time we will be showing all data (which comes from DB )when we search for some particular type of items the grid must display that corresponding data

let say we have a grid with 3 columns which says that a product belongs to particular grade lets say product pd1 belongs to grade 1 ,pd2 to grade 2 ,pd3 to grade1 and grade2 and pd4 belongs to none if i search products belonging to grade1 the grid must have only pd1 record..how can i do this without passing a hitting to DB
45957

willigogs
25 Sep 2013, 3:03 AM
Yes, you can simply use the store's filter method:
http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.data.Store-method-filter
(http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.data.Store-method-filter)
...or the filterBy method:
http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.data.Store-method-filterBy