1
Help for ParamQuery Pro / named function on format
« on: May 21, 2020, 10:07:37 am »
Hello,
Im trying to pass a simple format and deFormat as named functions and they dont seem to work.
This is because my colModel comes from a JSON
Im trying to pass a simple format and deFormat as named functions and they dont seem to work.
Code: [Select]
function pqFormatPercent(val) {
return (val==null || val==="")? "": (pq.formatNumber(val * 100, "#,###.0") + "%");
}
function pqDeFormatPercent(val) {
return (pq.deFormatNumber(val.split('%')[0], '#,###.00') / 100);
}
This is because my colModel comes from a JSON
Code: [Select]
"postpaid_sales": {
"align": "right",
"title": "Postpaid Sales",
"format": "pqFormatPercent",
"deFormat": "pqDeFormatPercent",
"dataIndx": "postpaid_sales",
"dataType": "float"
},