Lets say that grid uses JSON to display data, but what i need is to display data only when some parameters given to search, ID or name. There is a live search grid example, but what i need is a simple search JSON for Id or name. Grid not showing anything unless some parameters are provided, this is because of a large database.
I tried this:
{
xtype: 'button',
text:'Traži',
width:80,
margin: '14 10 5 10',
handler:function(){
myStore.filter('naziv', Ext.getCmp("textFieldNaziv").getValue());
}
but works only when grid already populated…, with autoLoad:false, no result. Which means that it doesnt “search” but only cuts down what has already displayed….??????
How to somehow say that when it “filters” it starts from top, filtering whole JSON, not only the one being displayed at the moment!!!
The answer is: