build 91111 of DHTMLX v2.5
I’m not able to get setNumberFormat to work as expected. What am I doing wrong?
I have 4 numeric columns in myGrid and I set their formating this way:
DPnt=",";
Sep=" ";
myGrid.setNumberFormat(“0,000.00”,2,DPnt,Sep);
myGrid.setNumberFormat(“0,000.00”,3,DPnt,Sep);
myGrid.setNumberFormat(“0,000.00”,4,DPnt,Sep);
myGrid.setNumberFormat(“0,000.00”,5,DPnt,Sep);
myGrid.init();
I’m interpreting this to mean that a comma will be used as the decimal character and a space as the group separator.
When 87915.89 is displayed, the user sees: 87 915.89,00
You’ll notice that the decimal point remains a period, but “,00” is appended to the right end of the string. However, the group separator is correct.
How do I fix this?
Note, neither “decimal_separator” nor “group_separator” are being set anywhere in my code.
Also, I’m reading your CHM help file. In this topic: “setNumberFormat(mask, cInd, p_sep, d_sep)”, the link under related articles “Formatting Numeric Values” actually takes one to an article about formatting dates.
Thanks,
Karl