This is an example:
Ext.define('Webdesktop.view.admin.List', {
extend: 'Ext.grid.Panel',
alias: 'widget.admin_casoslist',
initComponent: function() {
var me = this,
filters = {
ftype: 'filters',
encode: false,
local: true
};
Ext.apply(me, {
title: 'gridTitle',
store: List_CasSos_Store,
filterable: true,
features: [filters],
closable: true, // fixme: need to set here, because has no effect in tabpanel defaults configuration
autoScroll: true,
columns: {
items:[
{
text: 'header1',
filter: {
type: 'string'
},
flex: 1,
dataIndex: 'relation_patron_paraine'
},{
text:'header2',
filter: {
type: 'list',
options: ['case4', 'case3', 'case2', 'case1']
},
hidden:true,
flex: 1,
dataIndex: 'etatsante'
},{
text:'header3',
filter: {
type: 'numeric'
},
hidden:true,
flex: 1,
dataIndex: 'revenumnsuel'
}
],
defaults : {
align: 'center'
}
}
});
me.callParent();
}
In the controller:
uses: [
'Webdesktop.view.admin.List',
...
'Ext.ux.grid.FiltersFeature'
]