ParamQuery grid support forum

General Category => Suggest new features => Topic started by: jasonwon on April 05, 2021, 09:54:41 am

Title: How to change filtering target.
Post by: jasonwon 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?
Title: Re: How to change filtering target.
Post by: paramvir 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
Title: Re: How to change filtering target.
Post by: jasonwon 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?