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

arbyter

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 43
  • Retired IT Guy
    • 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: 6310
    • View Profile
Re: filter on all fields does not work
« Reply #1 on: February 24, 2019, 10:28:45 pm »
I've created this plnkr:

https://next.plnkr.co/edit/QC2tqjeoCJS1uFRa?preview

Please try to reproduce issue in this pnkr so that I can check it for you.

arbyter

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 43
  • Retired IT Guy
    • 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 Ultimate
  • Newbie
  • *
  • Posts: 43
  • Retired IT Guy
    • 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: 6310
    • View Profile
Re: filter on all fields does not work
« Reply #4 on: February 25, 2019, 09:16:24 pm »
I've added your data in this plnkr https://next.plnkr.co/edit/JULYdSepNh1bA4KP?preview , filtering works fine on all fields.

PS: you may need to click refresh icon in plnkr.

arbyter

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 43
  • Retired IT Guy
    • 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 Ultimate
  • Newbie
  • *
  • Posts: 43
  • Retired IT Guy
    • 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 Ultimate
  • Newbie
  • *
  • Posts: 43
  • Retired IT Guy
    • 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.