I'm having really hard time to understand or maybe more correct will be to say - to use filters on any of my store and loading the info in the grid. I have a more complex task but in order to understand how things work I decided to use as most simple example as I could just to see how things happen and then to add more logic so I can grind my knowledge. However still I don't get any encouraging results so I'm again asking for help.
I have a gridPanel in my model which use his own store, in this case :
"RecordsListStore"
And I have
xtype: combo;
which looks like this:
xtype: 'combo',
id: 'records_list_author_id',
emptyText: 'Филтриране по автор',
editable: false,
store: 'Users',
displayField: 'firstname',
valueField: 'id',
lastQuery: '',
triggerAction: 'all',
queryMode: 'remote',
typeAhead: false,
width: 200,
listeners: {
select: this._filterRecords
}
Which uses it's own store to load data in the combobox which could be selected from the user.
The thirs part, the select function is:
_filterRecords: function()
{
var recStore = Ext.getStore('FilterRecordsByAuthor');
var a = Ext.getCmp('records_list_author_id').getValue( );
var rec = Ext.getStore('FilterRecordsByForm').getAt(a);
recStore.filters.clear();
//recStore.load();
recStore.filter([{
"property":'form_id',
"value": 1
}]);
console.log(recStore.load());
},
Here comes a third store which I think to use for fetching the the filtered data. The problem is that the console log shows that I send the filters but everytime I get empty result. But if everything works as I thought it should there must me some info, so there's mistake or something missing, but I can't figure out what should be done.
_filterRecords: function() { var a = Ext.getCmp('records_list_author_id').getValue( ); var rec = Ext.getStore('RecordsListStore'); rec.filters.clear(); rec.filter([{ "property":'author_id', "value": a }]); console.log(a); },I get things working now the grid is loaded with the info, I just needed to add $data['filter'] in my SQL query but now I want to relod the store without filters any ideas?I try thishandler: function() { var rec = Ext.getStore('RecordsListStore'); rec.load(); }but no success - Leron_says_get_back_Monica