3.2.0

setTextFormat() being multiplied by 1,000

I've tried just about everything I can think of, and have tried following every example I have found in the forum, but I still have the same problem. When I apply a text format all of my values are being multipleid by 1,000.

I have a js array and I have used setCellData(myData).

I also use the following code:

var df = new AW.Formats.Date; 
    df.setTextFormat("mm-d-yy");
    oCampaignGrid.setCellFormat(df, 1);
    oCampaignGrid.setCellFormat(df, 2);
    var number = new AW.Formats.Number; 
    number.setTextFormat("###,###,###");
    oCampaignGrid.setCellFormat(number, 8);
    oCampaignGrid.setCellFormat(number, 9);
    oCampaignGrid.setCellFormat(number, 10);
    var dollar = new AW.Formats.Number; 
    dollar.setTextFormat("$ ###,###,###");
    oCampaignGrid.setCellFormat(dollar, 12);
    oCampaignGrid.setCellFormat(dollar, 13);


The date stuff seems to be displaying and sorting fine, but the numbers and dollars are all multiplied by 1,000.

What am I doing wrong, and what do I need to do to fix this problem.

Thanks in advance.
Jack Yo
June 9,
It seems that the second comma is interpreted as decimal point. You should try 2.0.1 with the following formats -

number.setTextFormat("#,###.");
dollar.setTextFormats("$ #,###.");
Alex (ActiveWidgets)
June 12,
Hi Alex,

Thanks for the quick response. That seemed to work, but... we didn't want the trailing decimal point ($ 0.). If we leave the decimal point out of the format ("#,###") we get things multiplied by 1,000. If we put it in we have a decimal point where we don't want it.

Do you have any other suggestions?

Thanks a lot,
Jack Yo
June 12,
Jack,

the trailing dot will not be printed in AW 2.0.1
Alex (ActiveWidgets)
June 12,

This topic is archived.

See also:


Back to support forum