PDA

View Full Version : Client-side grid filtering (Newbie)



protech
29 Mar 2007, 10:46 AM
Hi everyone - I am looking for a client-side filtering functionality for the grid - exactly like on http://www.vonloesch.de/node/23 - text box which filters rows dynamically when typed into.

Is that possible and can someone please give detailed example (newbie :oops: )?

Thanks!

JeffHowden
29 Mar 2007, 11:21 AM
Here's how to drop a filter field into the paging toolbar, which you may find useful.

http://www.yui-ext.com/forum/viewtopic.php?t=3261

Beyond that, you'll want to look into the built-in filter() methds of the Store class. It's not documented so you'll need to crack open /source/data/Store.js and do some detective work yourself.

jm_IDT
24 Apr 2007, 10:17 AM
The link is dead above, I would like to see how this would be done. ( making one of my combo boxes a filter for the grid "client side")

thanks,

tryanDLS
24 Apr 2007, 10:43 AM
Here it is (http://extjs.com/forum/showthread.php?t=2758&highlight=grid+filter)

jm_IDT
25 Apr 2007, 5:03 AM
Tim, thanks for the quick reply!

This works perfectly if you are working with server side paging and filtering. Although, I am using client side paging and would like to also use client side filtering. Is there an easy way to change the code you posted so it will handle client side filtering of the grid with my drop down combo boxes that I have located in the paging footer?

tryanDLS
25 Apr 2007, 7:49 AM
I haven't really looked at the code, but I would think it would be simple to change that handler (e.g. combo select or filter btn) to call store.filter() rather than triggering a store.load with the filter expression.

trbs
25 Apr 2007, 8:36 AM
Hi guys,

Maybe my quicksearch example is what your looking for.
It filters the current page (or the entire store) of a grid, while your typing in the box. (It would be trivial to only filter on <enter>) From what i've read in the original post this the example that you want.

Example:
http://ido.nl.eu.org/pir/

Thread:
http://extjs.com/forum/showthread.php?t=3118&highlight=trbs