The filtersfeature
doesn't store the filter info in the same place as the default filters go. I don't know why, but it doesn't. In the same object you found the filters
and sorters
arrays, look in the params
property, there should be a property in params
called filter
. That will contain the filters. By default, I believe all the filters are encoded into a json string, so if you want them as an array, you'll have to use Ext.decode
.
Grid Filter not submitting param values
Pregunta
I have a basic grid, and I have added some filters to columns. I added them in the constructor like so, since some of them use stores
constructor: function(config) {
Ext.apply(this, {
features : [{
ftype: 'filters',
encode: true,
local: false,
filters: [{
type: 'string',
dataIndex: 'name'
},{
type: 'string',
dataIndex: 'priority'
},{
type: 'list',
store: Ext.getStore('adminCategory'),
dataIndex: 'adminOrg',
labelField: 'displayName'
},{
type: 'list',
store: Ext.getStore('adminClientList'),
dataIndex: 'client',
labelField: 'name',
listeners: {
activate: function(obj, eOpts) {
console.log(obj);
}
}
}]
}]
});
this.callParent(arguments);
The menu items load just fine, however when the filter activates, and starts to load the store, the filter params are not present, so they aren't submitted to the server.
I checked the beforeload
event on the store, and the filters
array is empty (in the operations object where all the sorter info is stored too).
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow