Reputation: 1258
What i want to do is a filter option in a column of a grid. THis is the column:
{
id: 'kleuren',
text: 'Kleuren',
sortable: true,
filterable: true,
minWidth: 60,
flexible: 0,
width: 60,
filter: {
type: 'list',
store: kleuren
},
renderer: kleurenWeergave,
dataIndex: 'kleuren'
}
for the store/model i use this
kleurenStore = Ext.create('Ext.data.Store', {
fields: ['id', 'text'],
data: kleurenModel
});
var kleurenModel = [
['rood', 'rood'],
['groen', 'groen'],
['blauw', 'blauw'],
['geel', 'geel']
]
This is my grid now
var grid = Ext.create('PersistantSelectionGridPanel', {
autoscroll: true,
region: 'center',
store: allLoaded,
multiSelect: false,
stateful: true,
features: [filtersFeature],
loadMask: false,
stateId: 'stateGrid',
viewConfig: {
stripeRows: true
},
columns: [{....
Upvotes: 0
Views: 1561
Reputation: 458
What version of ExtJS are you running ? Cant debug much with the code you posted.
Can you post the code of your Grid ??
Your Grid should have a filters feature added as a config :
var filtersFeature =
{
ftype : 'filters',
local : false, // For Server Side Filtering
encode : true
};
And your grid should have a config option
....
columns: defaultModel,
loadMask: true,
features: [filtersFeature] // To enable Filters
....
Upvotes: 1