-
31 Jan 2013 4:39 AM #161
Plugin not working
Plugin not working
Hi,
Please check below code, I can see grid filter row , but it is not filtering data.
Do I need to write any code for filtering data from data store.
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title> New Document </title> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <link rel="stylesheet" type="text/css" href="css/ext-all.css" /> <script type="text/javascript" src="adapter/ext/ext-base.js"></script> <script type="text/javascript" src="ext-all.js"></script> <script type="text/javascript" src="ext-all.js"></script> <script type="text/javascript" src="GridHeaderFilters.js"></script> <script type="text/javascript"> Ext.onReady(function() { // sample static data for the store var fields=[{ type: 'string', name: 'item' },{ type: 'string', name: 'description' },{ type: 'string', name: 'po' },{ type: 'string', name: 'style' },{ type: 'string', name: 'size' },{ type: 'int', name: 'ysqty' },{ type: 'int', name: 'ssqty' },{ type: 'string', name: 'remark' }] var columns=[{ dataIndex: 'item', header: 'Item', filter: {xtype:"textfield", filterName:"CODE"}, enableKeyEvents: true },{ dataIndex: 'description', header: 'Description', width:300, filter: {xtype:"textfield", filterName:"CODE"}, enableKeyEvents: true },{ dataIndex: 'po', header: 'PO' },{ dataIndex: 'style', header: 'Style' },{ dataIndex: 'size', header: 'Size' },{ dataIndex: 'ysqty', header: 'ysqty' },{ dataIndex: 'ssqty', header: 'ssqty' },{ dataIndex: 'remark', header: 'remark' }] var data=[['item1','aaaaa','PO1','style1','L',90,85,'SDFDSF'],['item1','aaaaa','PO1','style1','M',70,65,'SDFDSF'] ,['item1','aaaaa','PO2','style4','M',70,65,'SDFDSF'],['item2','aaaaa','PO1','style1','M',70,65,'SDFDSF'] ,['item2','aaaaa','PO1','style1','M',70,65,'SDFDSF'],['item2','aaaaa','PO1','style1','M',70,65,'SDFDSF']] var grid = new Ext.grid.GridPanel({ renderTo: 'grid', title: 'Sales By Location', width: 1000, height: 400, store: new Ext.data.ArrayStore({ fields: fields, data: data }), columns: columns, viewConfig: { forceFit: true }, plugins: [new Ext.ux.grid.GridHeaderFilters()] }); }) </script> </head> <body> <div id="grid"></div> </body> </html>
-
6 Mar 2013 12:35 PM #162
-
3 May 2013 12:56 PM #163
Hide filters
Hide filters
Does anyone have an example of hiding the filters for the latest version of this plugin? I have a button to show/hide the filters and this works for that:
toggleFilters: function(bShow) {
for(fc in this.filterContainers) {
var container = this.filterContainers[fc];
if(bShow) {
container.show();
} else {
container.hide();
}
}
}
However, if I call toggleFilters to hide them when the grid is first rendered the above does not work. Any ideas on how to fix this issue? I tried adding doLayout and syncSize, still no luck.
-
7 May 2013 7:41 AM #164
Can you try to use it in the "afterrender" event?
Extensions:
Ext.ux.DatePickerPlus (Multimonth,Multiselect,...)
Ext.ux.menu.StoreMenu - Ajax Store as menu-item config
Extended Window - Aero Shadows, nested grayscaled modal windows
Ext.MessageBox.promptCombo/promptRadio/promptCheckbox
Ext.ux.plugin.triggerfieldTooltip (for Comboboxes, Datefields...)
Ext.util.MD5
Ext.util.Utf8 (encode/decode)
Ext.util.base64 (encode/decode)
Using:
ExtJS 3.4.1.1/4.2
XPsp3/W7sp1
IE8/9/10
FF 20
Chrome 26
-
7 May 2013 9:39 AM #165
Hide filters
Hide filters
Thanks for replying....
Adding a call to toggle the filters in the afterrender event only works if we add a 2 second delay. Something in the DOM is not be refreshed to hide the filters, if you view the filters using firebug the hidden attribute is true. Any more ideas?
-
28 May 2013 12:19 PM #166
That is important information...but I don't figure what you mean....
The post is on a json file
http://.../antidote.json?start=0&antidote=Thiosulfate
Can't see what I can do...
Can you please give more details?
Thanks in advance
-
28 May 2013 12:25 PM #167
The filter information is sent in the header:
ex:
The server side would need to parse this and then apply the proper filter on the DB/table and send the filtered data back to the clientCode:filter:[{"property":"user_name","value":"admin","type":"string","operator":"like"}]
Scott.
-
29 May 2013 5:01 AM #168
Thanks for the details.
I thought the filter was managed on client side directly inside the store (geoext.featurestore...a geojson)
-
4 Jun 2013 12:21 PM #169
listeners on combo
listeners on combo
I got it working.
I need to launch a function when the value of a combobox as changed. I tried to use a listener on the combo without success (see code below). What is the right way to know when the value changed?
Code:filter: { xtype: "combo", store: liste_rss, valueField: 'valeur', displayField: 'valeur', triggerAction: 'all', listeners: { select://also tried with 'change' { fn:function(combo, value) { alert('allo'); } } } }
-
5 Jun 2013 10:30 AM #170
It seems that the combo's listener is not working inside the filter definition.
Please tell me if this is a bug.


Reply With Quote