-
10 Oct 2007 2:11 AM #21
Hi everyone,
I would also like to know if it would be possible to do the filtering on the client side rather than using a server-side call?
-
10 Oct 2007 9:35 AM #22
Thank you for your help! "deferredUpdate.cancel()" did the trick.
But I solved another issue i had. setValue() cannot be called in the "metachange" event of the grids store, because of conflicting events, so i did it in the "load" event - It took me hours to find out.
To accomplish the state saveing/restoring i extended the GridFilters-class by a "setFilterData()" method, which does the opposite of "getFilterData()" by another set of "unserialze()" methods of the filter-type-classes.
If you are interested i can post the code.
-
10 Oct 2007 12:08 PM #23
Help me pls
Help me pls
Hi ambience,
Your filter works well,thanks for posting such a wonderful code
I m newbie and am learning through your code
so can i get a PHP file(ie action.php)so that i can try fetch from my database
Thanks in advance.
-
11 Oct 2007 8:19 AM #24
AlxH: Sure, post away. I am working on a grid state manager plugin myself that will have similar functionality. Though, I plan on using the setValue function to restore the state.
Lyardson: I have attached the two important files for parsing the filters and generating the required SQL. They are components of a much larger frame work which is losely based on WACT, so they won't function as is. But hopefully they should point you in the right direction =)
-
11 Oct 2007 5:09 PM #25
Hi ambience, the filter is very good, is possible to add a features where the user can build for each column the conditions, and then save/load it will be very good, because is hard when you use a filter with several columns, make always the filter, I think will be good to to a clear filter, where, all condition for each columns can remove
regards
Frank
-
14 Oct 2007 7:13 AM #26
Very well done filter!

If you dont want/like to display filtering in a separate area(e.g. unter the colum headers as mentioned before), what about just _displaying_ a little filter-symbol, if the column is filtered or not? This way, you dont need to check each column menu if _some_ filter is set or not and you can see immediatly, if the whole list is filtered somewhere.
Just like the little triangle-symbol displaying in the header when the list has been sorted as/descending. That would help a lot i think.
Also, the "save-my-filter" option would be very nice, but i guess this is something every developer using ext has to code this by himself. Just a little property like a ".getAllColumnFiltersInAJSONString" would be helpful within your plugin (maybe something like this is already included, i didn't check the whole api yet...is it?)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
-
14 Oct 2007 10:44 AM #27
Anybody using those php filter files?
Any source code of use?)
-
14 Oct 2007 6:03 PM #28Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Forest Grove, OR
- Posts
- 1,038
- Vote Rating
- 0
Visual feedback of a filtered column is already supported. Notice when you filter a column the text changes to bold/italic. This is achieved by adding the class "ux-filtered-column" to the column header. In the CSS, this is defined as:
Should you decide this isn't enough feedback for your users, it'd be a piece of cake to apply your own styling via the "ux-filtered-column" class.Code:.x-grid3-hd-row td.ux-filtered-column { font-style:italic; font-weight:bold; }Jeff Howden
Ext JS - Support Team Volunteer
jeff@extjs.com
Any and all code samples that are authored by me and posted on the Ext forums or website are hereby released into the public domain and I release anyone or entity of liability by using said code samples unless explicitly stated otherwise.
Opinions are mine and not necessarily endorsed by Ext, LLC. Please do not contact me directly for assistance unless requested by me.
-
15 Oct 2007 9:55 AM #29
Code Update
Code Update
Jeff: Thanks for fielding that question. You can also customize what class is applied to the filter header by passing the filterCls config value with a different class name.
I have updated the source on the demo page and will also be attaching the source to the OP. Updates are as follows:- Local filtering can now be enabled by passing the 'local: true' as a config value
- Fixed some of the filters setValue functions.
- Stateful mode can now be enabled by passing a string value for the config option 'stateId'. This may be updated in the next Ext code push to store this information when the grid saves/restores its state. However, the events required are not part of the current beta (I think they are in SVN however)
- Add an 'autoReload' field / config option that defaults to true. Set this to false if you wish to prevent the datastore from being reloaded when you make changes to the filters.
That's it for now, enjoy.
P.S. As requested, future updates will appear in the OP.
-
15 Oct 2007 10:10 AM #30Extensions:
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


Reply With Quote




