-
5 May 2012 2:02 PM #1
Adding grid filters using FilterFeatures
Adding grid filters using FilterFeatures
Hello,
How would I add a filter to a grid colum like the ones demoed here. I know it is an extension and from what I can tell they are not directly supported in Architect yet. But there must be a way to do it. Any ideas? I know I have to add...
but I dont know where or how.Code:Ext.require([ 'Ext.ux.grid.FiltersFeature' ]);
Thanks
-
5 May 2012 10:21 PM #2
A simple filtering can be added as fields in the toolbar
Here is a simple example of filtering a grid n one field, but can be extended with using multiple fields in the filtering
var aStore = Ext.StoreMgr.lookup('AStore');
var newValue = textfield.getValue();
var filterTxt = new RegExp(".*" + newValue + ".*", "ig");
aStore.clearFilter();
if (newValue.length > 0){
aStore.filter("text", filterTxt);
}
-
6 May 2012 3:38 AM #3
Thanks for the reply. I am aware that it would be simple enough to filter the store, but the real feature I want is the filter box that shows up when you click the down arrow at the column heading (see link in original post).
Thanks
-
6 May 2012 2:22 PM #4
Inclute the necesary ux files from html file othen than SA's app.html. Then create an override in the grid component to include filter feature.
Regards.UI: Sencha Architect 2.x / ExtJS 4 MVC
Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
Application Server: Glassfish 3.1.x
Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5
If you like my answer please vote!
-
14 May 2012 10:31 AM #5
Uncaught TypeError: Object [object Object] has no method 'setMenu'
Uncaught TypeError: Object [object Object] has no method 'setMenu'
When I use the filter option on the grid I get the following error when passing through the menu on the column
-
4 Jun 2012 8:19 AM #6
-
18 Jun 2012 5:42 AM #7
bump
bump
Hello,
I am facing the same problem, I have trouble finding a solid guide how to use overrides correctly and especially for the FilterFeatures I would love to see a working example.
cheers
/anja
-
18 Jun 2012 11:25 PM #8
In my case it wokrs when I:
1. add the css files to the custom index.html
2. configure the loaderHTML Code:<link rel="stylesheet" type="text/css" href="data/js/extjs4/examples/ux/grid/css/GridFilters.css"/> <link rel="stylesheet" type="text/css" href="data/js/extjs4/examples/ux/grid/css/RangeMenu.css"/>
3. require the featureCode:Ext.Loader.setConfig({ disableCaching: false, enabled: true, paths: { 'Ext.ux': 'data/js/extjs4/examples/ux', 'Ext.ux.exporter': 'data/js/extjs4ux/exporter', 'Ext.ux.gridprinter': 'data/js/extjs4ux/gridprinter' } });
4. copy and paste the feature configuration into the Filter or Quick Value Set field near the top of the config panel and then click on the Add button, e.g.Code:Ext.application({ requires: [ 'Nav.view.override.CheckColumn', 'Ext.ux.grid.FiltersFeature', 'Ext.ux.exporter.Exporter', 'Ext.ux.gridprinter.Printer' ], ...
Code:features: { ftype: 'filters', autoReload: false, local: true, updateBuffer: 1000, filters: [ { type: 'numeric', dataIndex: 'No' }, { type: 'string', dataIndex: 'Name' }, { type: 'string', dataIndex: 'Post_Code' }, { type: 'string', dataIndex: 'City' }, { type: 'string', dataIndex: 'Country_Region_Code' }, { type: 'string', dataIndex: 'Language_Code' }, { type: 'list', dataIndex: 'Blocked', options: [ 'Ship', 'Invoice', 'All' ], phpMode: true }, { type: 'boolean', dataIndex: 'Checked' }, { type: 'date', dataIndex: 'Cheched_at_date' }, { type: 'date', dataIndex: 'Next_check_at' } ] }First I would like to thank you for your time and knowledge
Win 7 Ext JS 4.1.3 IE(6-9), FF17
-
19 Jun 2012 5:30 AM #9
cheers!
cheers!
that worked fine with me too.
-
19 Sep 2012 2:39 AM #10
Code sharing
Code sharing
Can you please share some sample application? I am unable to add filter fearture.


Reply With Quote
