ParamQuery

General Category => Help for ParamQuery Pro => Topic started by: mscodigno on April 20, 2021, 01:19:47 pm

Title: Does not filter on the formatted price
Post by: mscodigno on April 20, 2021, 01:19:47 pm
Hello, the price field comes from the database in the format '#. ###, 00'. I cannot use the filtering feature in this column. What should I do?

https://jsfiddle.net/zekeriyaerogluu/kqmzv45u/31/
Title: Re: Does not filter on the formatted price
Post by: paramvir on April 20, 2021, 10:00:25 pm
Formatted values can be converted back to numbers with pq.deFormatNumber method.

Code: [Select]
    var dataModel = {
      data: data.map(function(rd){     
        rd.unitePrice = pq.deFormatNumber(rd.unitePrice, "#.###,00");
        return rd;
      })
    };

https://jsfiddle.net/eu5jkphm/
Title: Re: Does not filter on the formatted price
Post by: mscodigno on April 21, 2021, 12:00:33 pm
1. I want it to appear formatted in the edit box as well. Can i do that?

2. How can I do for remote data?
Title: Re: Does not filter on the formatted price
Post by: paramvir on April 21, 2021, 11:01:57 pm
1. No

2. Please use dataModel.getData callback.