Author Topic: filter on all fields does not work  (Read 2558 times)

arbyter

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 35
    • View Profile
filter on all fields does not work
« on: February 22, 2019, 08:32:06 pm »
hi
i tried to implement the filtering of datagrid like the demo "local filtering" (copied all the stuff from the demo)
As long i choose a field, filter works. As soon i select "all fields" no rows get returned.
I tried to set up in fiddler, but it did not work (or i downt know how to do it) .
here is a link to a minified example of my project:
https://stockfritz.chpost.ch/?action=adressverwaltung


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5290
    • View Profile
Re: filter on all fields does not work
« Reply #1 on: February 24, 2019, 10:28:45 pm »
[ Only Pro members may read this post. ]

arbyter

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: filter on all fields does not work
« Reply #2 on: February 25, 2019, 08:30:10 pm »
i tried to setup my example in plunkr, but it seems externally dataload is not allowed. So i changed it to json local data, but it is not showing up my data (like list is empty).
So i am stuck.
Please have a look into this.

arbyter

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: filter on all fields does not work
« Reply #3 on: February 25, 2019, 09:00:29 pm »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5290
    • View Profile
Re: filter on all fields does not work
« Reply #4 on: February 25, 2019, 09:16:24 pm »
[ Only Pro members may read this post. ]

arbyter

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: filter on all fields does not work
« Reply #5 on: February 26, 2019, 09:42:34 pm »
it took me quite a while to realize, that filterModel: { mode: "OR" } was missing!
Maybe this should be default??
thank you

arbyter

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 35
    • View Profile
another question on filter on all fields
« Reply #6 on: February 27, 2019, 02:13:31 pm »
hi
now i implemented search and it works but another question rises up:
I tried to filter on all fields with option "contain".
You may try it on plunker: https://next.plnkr.co/edit/JULYdSepNh1bA4KP?preview
Enter just an "a", filter returns all fields containng "a".
Try it with single charctes "d", "f", "g", no filterresult, despite the fact that there are plenty of fields containig these charactes.
If searching for "de", or "fe", result is correct.

arbyter

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: filter on all fields does not work
« Reply #7 on: February 27, 2019, 05:22:36 pm »
found it:
in the example filterRender function change
the first line to var val = val = ui.cellData?ui.cellData:"",
then it works as expected.