1. #21
    Sencha User
    Join Date
    Sep 2007
    Posts
    2
    Vote Rating
    0
    kfuglsang is on a distinguished road

      0  

    Default


    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?

  2. #22
    Sencha User
    Join Date
    May 2007
    Location
    Germany
    Posts
    73
    Vote Rating
    1
    AlxH is on a distinguished road

      0  

    Default


    Quote Originally Posted by ambience View Post
    Sorry I didn't have time to really fully address your issue. It's a bit of a hack, but you could call gridFilter.deferredUpdate.cancle(); immediately after you add your filters / set values.

    I'll see if I can come up with something a bit more elegant in a future version.
    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.

  3. #23
    Ext User
    Join Date
    Sep 2007
    Posts
    4
    Vote Rating
    0
    lyardson is on a distinguished road

      0  

    Default 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.

  4. #24
    Ext JS Premium Member ambience's Avatar
    Join Date
    Mar 2007
    Location
    Denver, CO
    Posts
    136
    Vote Rating
    0
    ambience is on a distinguished road

      0  

    Default


    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 =)
    Attached Files

  5. #25
    Sencha User
    Join Date
    Mar 2007
    Posts
    767
    Vote Rating
    1
    franklt69 is on a distinguished road

      0  

    Default


    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

  6. #26
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    891
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    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?)

  7. #27
    Sencha User
    Join Date
    Jul 2007
    Location
    Moscow, Russia
    Posts
    295
    Vote Rating
    0
    6epcepk is on a distinguished road

      0  

    Default


    Anybody using those php filter files?
    Any source code of use?)

  8. #28
    Sencha - Community Support Team JeffHowden's Avatar
    Join Date
    Mar 2007
    Location
    Forest Grove, OR
    Posts
    1,038
    Vote Rating
    1
    JeffHowden is on a distinguished road

      0  

    Default


    Quote Originally Posted by wm003 View Post
    [...]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?[...]
    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:

    Code:
    .x-grid3-hd-row td.ux-filtered-column {
    font-style:italic;
    font-weight:bold;
    }
    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.
    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.

  9. #29
    Ext JS Premium Member ambience's Avatar
    Join Date
    Mar 2007
    Location
    Denver, CO
    Posts
    136
    Vote Rating
    0
    ambience is on a distinguished road

      0  

    Lightbulb 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.

  10. #30
    Sencha User
    Join Date
    Oct 2007
    Location
    Berlin, Germany
    Posts
    891
    Vote Rating
    9
    wm003 will become famous soon enough

      0  

    Default


    Quote Originally Posted by JeffHowden View Post
    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.

    Oh, thanks for the info! Of course, that will do the trick

Thread Participants: 312

  1. jack.slocum (1 Post)
  2. JeffHowden (8 Posts)
  3. VinylFox (1 Post)
  4. ericwaldheim (1 Post)
  5. franklt69 (2 Posts)
  6. galdaka (5 Posts)
  7. jay@moduscreate.com (1 Post)
  8. ejetorix (1 Post)
  9. Wolfgang (1 Post)
  10. alien3d (1 Post)
  11. tobi (1 Post)
  12. HarryC (1 Post)
  13. vmorale4 (3 Posts)
  14. gmoney (1 Post)
  15. ReyBango (1 Post)
  16. mystix (5 Posts)
  17. fangzhouxing (1 Post)
  18. cobnet (7 Posts)
  19. mike1993 (1 Post)
  20. JorisA (9 Posts)
  21. krdavis (1 Post)
  22. tarnawska (3 Posts)
  23. simonellistonball (1 Post)
  24. Foggy (1 Post)
  25. Illiarian (3 Posts)
  26. cocorossello (4 Posts)
  27. rlieving (2 Posts)
  28. violinista (1 Post)
  29. Fabyo (1 Post)
  30. efiebba (2 Posts)
  31. notjoshing (5 Posts)
  32. akannu (2 Posts)
  33. Troy Wolf (7 Posts)
  34. AlxH (8 Posts)
  35. pantarhei (1 Post)
  36. tobiu (5 Posts)
  37. kesteb (5 Posts)
  38. ajaxE (11 Posts)
  39. robasi (2 Posts)
  40. dandfra (1 Post)
  41. ethan (1 Post)
  42. krycek (1 Post)
  43. ronnin (1 Post)
  44. Twain (2 Posts)
  45. Phunky (2 Posts)
  46. ostghost (2 Posts)
  47. tdikarim (2 Posts)
  48. chernomorez (6 Posts)
  49. 6epcepk (6 Posts)
  50. marceloprietos (1 Post)
  51. mjlecomte (55 Posts)
  52. andrei.neculau (2 Posts)
  53. catof (3 Posts)
  54. rednix (1 Post)
  55. george.antoniadis (1 Post)
  56. MatjazH (1 Post)
  57. Zyclops (5 Posts)
  58. gfernandez (2 Posts)
  59. boyjunqiang (2 Posts)
  60. hendricd (106 Posts)
  61. jelt (5 Posts)
  62. nonamebrand (1 Post)
  63. sidaliextjs (1 Post)
  64. watrboy00 (2 Posts)
  65. hermeslm (1 Post)
  66. pic_Nick (3 Posts)
  67. cherbert (1 Post)
  68. elrems (1 Post)
  69. Clever Cutter (4 Posts)
  70. kfuglsang (1 Post)
  71. aresot (1 Post)
  72. stradej (1 Post)
  73. Shmoo (4 Posts)
  74. evilized (1 Post)
  75. reaper.br (9 Posts)
  76. froamer (3 Posts)
  77. GraemeBryce (2 Posts)
  78. osamaao (1 Post)
  79. burned (1 Post)
  80. hb562100 (1 Post)
  81. lyardson (1 Post)
  82. lupin85.luca (5 Posts)
  83. thatcoder (4 Posts)
  84. bhomass (1 Post)
  85. jojo_i (3 Posts)
  86. wm003 (10 Posts)
  87. debutant (2 Posts)
  88. peio72 (4 Posts)
  89. b0c1 (1 Post)
  90. highmemory (1 Post)
  91. nedkopenev (1 Post)
  92. durlabh (1 Post)
  93. deependhulla (1 Post)
  94. elDub (2 Posts)
  95. fendrikat (1 Post)
  96. olive38 (5 Posts)
  97. Morris (1 Post)
  98. nnextjs (1 Post)
  99. smartlit (1 Post)
  100. paliwalg (2 Posts)
  101. maureend (1 Post)
  102. crxtech (4 Posts)
  103. alexi (1 Post)
  104. Sesshomurai (4 Posts)
  105. oldroy (1 Post)
  106. sjerry (1 Post)
  107. KGL (2 Posts)
  108. cbandes (1 Post)
  109. vertigoMX (2 Posts)
  110. tfrugia (2 Posts)
  111. stevets (1 Post)
  112. DevNullBinary (1 Post)
  113. rfjacobsen (1 Post)
  114. gameshints (1 Post)
  115. arya009 (2 Posts)
  116. adinata (4 Posts)
  117. sanjshah (2 Posts)
  118. jlagedo (1 Post)
  119. 1900 (1 Post)
  120. eliasp (4 Posts)
  121. sethladd (2 Posts)
  122. mariposil (4 Posts)
  123. dearsina (6 Posts)
  124. plima (1 Post)
  125. edweb (1 Post)
  126. caturstudio (1 Post)
  127. RacingTomcat (1 Post)
  128. larowlan (2 Posts)
  129. marco76 (1 Post)
  130. dterle (1 Post)
  131. julienp (2 Posts)
  132. franck34 (1 Post)
  133. calavera (6 Posts)
  134. markshih (1 Post)
  135. dmhost (1 Post)
  136. LeonardoAP (7 Posts)
  137. mikeasi (5 Posts)
  138. ybshyz (1 Post)
  139. basshcm (1 Post)
  140. mrollins (5 Posts)
  141. Ant1105 (1 Post)
  142. sinma (1 Post)
  143. mfrancey (7 Posts)
  144. zonereseau (1 Post)
  145. mjhaston (12 Posts)
  146. enterco (2 Posts)
  147. mattb (1 Post)
  148. nunziofiore (6 Posts)
  149. denkoo (1 Post)
  150. rafeekphp (1 Post)
  151. luv2hike (3 Posts)
  152. drieraf (2 Posts)
  153. tmartinez (3 Posts)
  154. techwolf (1 Post)
  155. sabiola (2 Posts)
  156. marmots (1 Post)
  157. jarofclay (2 Posts)
  158. snow (1 Post)
  159. spectrus (1 Post)
  160. razvanioan (5 Posts)
  161. johnsbrn (5 Posts)
  162. xp743 (1 Post)
  163. jbd007 (3 Posts)
  164. mikemc (1 Post)
  165. technicaltitch (1 Post)
  166. steppinrazor (4 Posts)
  167. alconeijr (3 Posts)
  168. Steffen Hiller (5 Posts)
  169. keckeroo (1 Post)
  170. jineshkunnath (1 Post)
  171. reminder (3 Posts)
  172. Arthur.Blake (1 Post)
  173. manilodisan (1 Post)
  174. Chemist (1 Post)
  175. tuxz0r (1 Post)
  176. azbok (5 Posts)
  177. pil0t (1 Post)
  178. Treefrog (1 Post)
  179. polgara (1 Post)
  180. Remy (8 Posts)
  181. nizarsm (2 Posts)
  182. cesarwbr (1 Post)
  183. m0nu (1 Post)
  184. FireGlow (1 Post)
  185. jrh (1 Post)
  186. vladok (1 Post)
  187. el_dark (1 Post)
  188. Canard64 (1 Post)
  189. radustefan (1 Post)
  190. cgs1999 (1 Post)
  191. joshjdevl (1 Post)
  192. eleseint (1 Post)
  193. Efex (2 Posts)
  194. Rotomaul (1 Post)
  195. renoye (3 Posts)
  196. mahendragayatri (1 Post)
  197. SoreGums (3 Posts)
  198. chrisevans123 (1 Post)
  199. businessman332211 (37 Posts)
  200. Michael Reach (1 Post)
  201. kristalgic (1 Post)
  202. wiznia (1 Post)
  203. imnphd (1 Post)
  204. gido.carper (1 Post)
  205. gxt (2 Posts)
  206. sami_user (5 Posts)
  207. martinorth (1 Post)
  208. benmclendon (1 Post)
  209. crackrock (1 Post)
  210. Bodom78 (3 Posts)
  211. shahram (2 Posts)
  212. jjshoe (7 Posts)
  213. robertp42 (2 Posts)
  214. nicola_java (1 Post)
  215. paulwang727 (1 Post)
  216. mcantrell (1 Post)
  217. Huuuze (1 Post)
  218. irwanex (1 Post)
  219. ddouden (1 Post)
  220. skaue (3 Posts)
  221. Bucs (1 Post)
  222. kinchyle (1 Post)
  223. foxmarco (1 Post)
  224. ralfhammer (1 Post)
  225. Finity (1 Post)
  226. dmolesky (1 Post)
  227. dreas (1 Post)
  228. oliverseitz (1 Post)
  229. Wohlrajh (1 Post)
  230. phola (2 Posts)
  231. cvasilak (1 Post)
  232. quen567 (2 Posts)
  233. youdie (1 Post)
  234. cmschick (3 Posts)
  235. SunWuKung (1 Post)
  236. rickystra (2 Posts)
  237. inptisto (1 Post)
  238. extjs_new (1 Post)
  239. igor_vlad (1 Post)
  240. jeanvincent (1 Post)
  241. ScottLoney (1 Post)
  242. axpa (1 Post)
  243. rondinos (1 Post)
  244. dgubber (1 Post)
  245. schturdark (1 Post)
  246. MehdiSZ (2 Posts)
  247. Datagenn (1 Post)
  248. Mr. Hibernate (1 Post)
  249. geo_cris_ro (1 Post)
  250. freepopo (1 Post)
  251. leopku (1 Post)
  252. zyon (2 Posts)
  253. azaqero (2 Posts)
  254. spiderweb (2 Posts)
  255. LeviOu (1 Post)
  256. zkhalid (3 Posts)
  257. puyngke (1 Post)
  258. IrishSitar (1 Post)
  259. Daina (1 Post)
  260. heho2495 (1 Post)
  261. Andreas B. (2 Posts)
  262. chaoszcat (3 Posts)
  263. a.ti (2 Posts)
  264. coriolis (4 Posts)
  265. Thomas Triplet (3 Posts)
  266. thiner (1 Post)
  267. arkrohne (3 Posts)
  268. The Transporter (2 Posts)
  269. msinn (8 Posts)
  270. euphORIA (4 Posts)
  271. maznaz (1 Post)
  272. jankshtt (1 Post)
  273. small dragon (1 Post)
  274. msubbareddy (1 Post)
  275. djarquin (3 Posts)
  276. untwist (1 Post)
  277. xrx215 (1 Post)
  278. scblue (1 Post)
  279. jmilton59 (2 Posts)
  280. pbuser (1 Post)
  281. pmdarrow (1 Post)
  282. zozzi (1 Post)
  283. fabsen2102 (1 Post)
  284. Ebpo (1 Post)
  285. alexpotemkin (1 Post)
  286. Reimius (5 Posts)
  287. ebinfo (2 Posts)
  288. kellyjohn.carney (1 Post)
  289. abed_216 (1 Post)
  290. warmi01 (1 Post)
  291. Dmoney (1 Post)
  292. jago7372 (1 Post)
  293. softwareengineer (1 Post)
  294. DBorrega (1 Post)
  295. luisoswaldo (2 Posts)
  296. vrakesh_20 (1 Post)
  297. Skelv (2 Posts)
  298. israel.galan (5 Posts)
  299. pamelablalock (1 Post)
  300. pramodkhare (1 Post)
  301. EDFGRENOBLE (2 Posts)
  302. norbe (1 Post)
  303. Shobhit Rastogi (1 Post)
  304. hachie (1 Post)
  305. budaxlingga (2 Posts)
  306. ing.amdangelo (4 Posts)
  307. donremigio (1 Post)
  308. vbreader (1 Post)
  309. ecko (1 Post)
  310. tksko (1 Post)
  311. avorobjovs (1 Post)
  312. cleydsonjr (1 Post)