Author Topic: How to change filtering target.  (Read 2095 times)

jasonwon

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 2
    • View Profile
How to change filtering target.
« on: April 05, 2021, 09:54:41 am »
Hello.
Please inquire how to use filtering in PQGrid.

The dataModel has a value in code form.
When displaying this value in the cells of the grid,
We implemented a conditional statement inside the colModel.render(ui) function so that it is displayed in the form of a sentence according to the code value.

However, when I filter this column, I want to set the filtering target as a sentence, not a code value.
Of course, code values in dataModel must be untransformed.
Is there any way I can use it in this case?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6282
    • View Profile
Re: How to change filtering target.
« Reply #1 on: April 05, 2021, 12:46:14 pm »
Default filtering takes place on cell values and not rendered values.

Filtering on rendering values can be done by adding new filter condition or overriding compare function of inbuilt conditions:

Example:

https://paramquery.com/pro/demos/filter_custom
« Last Edit: April 05, 2021, 01:02:55 pm by paramvir »

jasonwon

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How to change filtering target.
« Reply #2 on: April 06, 2021, 07:44:39 am »
Thank you for answer.

Ok, I understand.
Do you have any plans to add an option to filter rendered values in the future?