I've been having a hard time looking for a solution to programmatically tick the Filters checkbox for Ext.ux.grid.FiltersFeature. Below are the codes I've done so far, but to no avail.
Ext.define('Axi.panel.OrdersGrid', {
extend: 'Ext.grid.Panel',
requires: ['Axi.ux.AnchorColumn',
'Axi.util.Util',
'Ext.ux.grid.FiltersFeature'],
...
initComponent: function() {
...
me.columns = [
...
{text: 'Cancelled', dataIndex: 'cancelled', align: 'center', width: 80,
active: true},
...
];
me.features = [{
ftype: 'filters',
filters: [
...
{type: 'string', dataIndex: 'cancelled',
value: (me.itemId == "deletedordersgrid" ? "Y" : null), active: true },
...
}];
},
listeners:{
'afterrender': function(){
...
var sFilter = this.filters.getFilter('cancelled');
sFilter.setValue("Y");
sFilter.setActive(true);
}
}
Aucun commentaire:
Enregistrer un commentaire