ParamQuery grid support forum
General Category => Bug Report => Topic started by: resolvecomputing on March 06, 2018, 05:16:21 pm
-
Can I get the data with format from table?
And when I set format in pivot, default it not show format and when I change filter it's show the format.
Thanks!
-
Sorry the question is not clear enough.
Can you please elaborate it with an example.
Thanks
-
1. I mean, the normally source data for column "abc" is 1000000, and after that I set format for "abc" is "#,###.00". So how can I get data from paramquery with result is 1,000,000.
2. The second question is: I used pivot and set format for column, but when loading the first time it's not show the format. I example: source data is 1000000 and I set format is "#,###.00" when loading the first it's show 1000000 but when I drag and drop pivot the format come 1,000,000.
Can you help me solve that problems.
Thanks!
-
1. Data and format are kept separate, format is applied only when data is displayed i.e., in grid or export as Excel. When grid data is exported as json data, format is not applied.
Format can be applied manually by iterating through rows and call pq.formatNumber method on each value.
https://paramquery.com/pro/api#method-formatNumber
2. I'm able to reproduce the issue (unable to set format dynamically after initialization to a pivoted column), would let you know once its fix is available
-
2nd issue is fixed in v5.2.0