Reputation: 1295
I am trying to do simple thing but somehow its not working out with me, in my grid table i want to add client side filter (in columns), i tried everything and followed the code at http://docs.sencha.com/ext-js/4-0/#!/api/Ext.ux.grid.FiltersFeature
my code is,
var filtersCfg = {
ftype: 'filters',
local: true,
filters: [{
type: 'string',
dataIndex: 'Stage'
}, {
type: 'string',
dataIndex: 'Type'
}]
};
//grid
var grid = Ext.create('Ext.grid.Panel', {
renderTo: Ext.getElementById("leftPanel"),
store: myStore,
height: 300,
filters : [filtersCfg],
title: "grid view",
columns: [
{
text: 'App',
sortable: true,
filterable: true,
dataIndex: 'Stage'
},
{
text: 'Stage',
sortable: true,
filterable: true,
dataIndex: 'Type',
}
.. ..
on clicking columns sort option is seen but there is no filter option
thanks in advance
Upvotes: 2
Views: 4158
Reputation: 16857
You can require additional extensions with Ext.require
.
Ext.Loader.setConfig({
enabled: true,
paths: {
'Ext.ux': './ext/ux'
}
});
Ext.require([
'Ext.ux.grid.FiltersFeature'
]);
The FiltersFeature.js is located inside examples\ux\grid
Upvotes: 2
Reputation: 1295
Hi @A1rPun i found that some of my files were corrupted and when i copied fresh ones it worked, i think your answer is perfect, we dont need any feature/filters.js file, only somehow wrong error throwwn in console by extjs
Upvotes: 1