-
4 Nov 2009 2:00 PM #41
What a great plugin. I'm a newbie to ExtJS, I tried experimenting on this plugin and found a bug: When you reorder the columns, the grid store will reload TWICE. I have no idea where and how to fix this. It's annoying since it will contact the server twice.
-
4 Nov 2009 11:40 PM #42
-
5 Nov 2009 7:19 AM #43
I just copied your code found in the first page.
-
6 Nov 2009 2:42 AM #44
-
6 Nov 2009 5:37 AM #45
-
7 Nov 2009 8:00 AM #46
When I use this plugin in my grid, this is an example of what I get posted to me at the server (since my store has other baseParams)
Currently, for the server side PHP to determine which are column filters, it has to have a knowledge of either what the dataindex names are (loop using inclusion) or what they are not (loop using exclusion). In either case, if fields are added or removed, the inclusion or exclusion set used to check against must be updated.Code:controller opsuk_admin first_name John last_name Weaver limit 5 start 0 task employee_records view main
It would be helpful if the filter parms could be differentiated by prefixing them with string such as FILTER_ so that the server side PHP could recognise them easily and construct the WHERE clause more simply. This way, all the PHP has to "know" is the name of the prefix (which could be hard coded or passed as another baseParam).
I am an ExtJs newcomer, so could someone tell me if this would be simple mod I could do myself, and if so, could you please give me some clues as to where to start looking.Code:controller opsuk_admin FILTER_first_name John FILTER_last_name Weaver limit 5 start 0 task employee_records view main
Many thanks,
Nick.Last edited by nickweavers; 9 Nov 2009 at 3:48 PM. Reason: correction
-
11 Feb 2010 10:34 AM #47
Using FilterParams as Object
Using FilterParams as Object
Hi Nick,
i am using a DirectStore Implementation that forces to have a known amount of
baseParams like start, limit, sort, sortdir, filters[]
For this reason, i modified the plugin a little bit (code is from 1.0.6, because i've problems with 1.0.9)
################################################Code:applyFilter: function(el, bLoad) ... if(Ext.isEmpty(sValue)) { //delete this.grid.store.baseParams[el.filterName]; delete this.filters[el.filterName]; } else { //this.grid.store.baseParams[el.filterName] = sValue; this.filters[el.filterName] = sValue; ...
################################################Code:applyFilters: function(bLoad) { if(arguments.length < 1) bLoad = true; for(var fn in this.filterFields) { this.applyFilter(this.filterFields[fn], false); } // CHANGE: attach all filters to one param this.grid.store.baseParams['filters'] = this.filters; if(bLoad) this.storeReload(); },
This is only a dirt example, but make this feature configurable would
be a great benefit for the plugin.
It is a must have for DirectStore implementations, where Post Params
are Mapped to Remote Classes with known Constructors.
Inside Ext, also the param order is hardcoded
---
Inside Store
so any unknown param won't be seen by the remote function!Code:,directFn: Adresse.find ,paramOrder: ['start', 'limit', 'sort', 'dir', 'filters']
For this reason, a posted filter list via name is not possible.
Also Saki's Search Extension and some other plugs are using this technique.
Maybe Mr. Zucconi can implement this feature in a next release.
Best wishes,
HolgerLast edited by mystix; 12 Feb 2010 at 8:17 AM. Reason: POST CODE IN [code][/code] TAGS. see http://extjs.com/forum/misc.php?do=bbcode#code
-
14 Feb 2010 12:11 PM #48
hide/show columns
hide/show columns
Columns width is crash if switch hide/show columns in grid.

If "viewConfig:{autoFill:true,forceFit:true}" - columns width is bad.
If element was hidden:true, and at some moment will be show() - filter not display.
storeReload not work, because of "this.grid.store.lastOptions" (undefined).
"this.grid.store.baseParams" needed may be.
Needed:
for optimizationchange: function(field, value){
if (value != field.value) this.applyFilter(field);
}
My Ext:3x
-
15 Feb 2010 6:49 AM #49
link demo not ok?
-
17 Mar 2010 4:30 AM #50
Bug ? Showing an initially hidden column, the filter box doesn't appear
Bug ? Showing an initially hidden column, the filter box doesn't appear
Hi,
Tested with Ext versions 3.0-3.1.1 and plugin versions 1.0.5/1.0.9.
I start up my grid with several columns hidden (by calling "ColumnModel.setHidden").
Now, when making these columns visible by using the grid header menu, the columns appear but without the filter.
Some debugging showed me that inside "onColHidden" you do "panel.doLayout();" which returns pretty early since "canLayout" returns false.
Possible solution - calling "panel.doLayout" with the "force" parameter = "true" works for me.
Not sure this is the best solution, as I didn't dig deep to really understand the problem, but thought I'd share what I have.
Thanks for the great plugin


Reply With Quote
.