:: Forum >>

AmountFormat always returns the same value

I have created the amount format "AW.Formats.Number" but this always returns the static value though I can see the correct data in view source of the page. Please see below code and any help in resolving this is appreciated.

function setupGrid() {
var gridData = new Array();
var gridObj = new AW.UI.Grid;

// Set header array.
var gridHeader = ["Paid Loss Amount"] ;

//Sets the format for amount cells
setCellFormatToAmount(1);

//Formats the data in the grid
gridObj.setCellData(gridData);

//User enters the net premium ceded amount on this cell
//gridObj.setCellEditable(true,3);

// Write the grid to the page
document.write(gridObj);
}

//Sets the AW grid object, cell Format to Amount
function setCellFormatToAmount(col) {
//Currency format for Amount cell
var number = new AW.Formats.Number;
number.setTextFormat("$#,###.##");
gridObj.setCellFormat(number, col);
}
Thanks
Rajendra
Tuesday, March 27, 2007
I got it. I have the changed the format to avoid space after dollar. If I use the format as is then it resolved.

var number = new AW.Formats.Number;
number.setTextFormat("$ #,###.##");
Rajendra
Wednesday, March 28, 2007
Are you using 2.0.0? This bug should be fixed now in 2.0.1 and 2.0.2.
Alex (ActiveWidgets)
Wednesday, March 28, 2007

This topic is archived.


Back to support forum

Forum search