var myData = [
["Number formats", "123456,889"],
["Number formats", "123456,78901"],
["Number formats", "123456,7890"],
["Number formats", "123456,78"],
["Number formats", "23456,78"]
];
var number = new AW.Formats.Number;
number.dataToValue1= number.dataToValue;
number.dataToValue=function(v){
v=v.replace(/\,/gi, ".")
return this.dataToValue1(v)
};
// number.setTextFormat("#.###,");
// grid control
var obj = new AW.UI.Grid;
obj.setCellData(myData);
obj.setCellFormat(number, 1); // numbers in the second column
obj.setColumnCount(2);
obj.setRowCount(5);
document.write(obj);
obj.onCellClicked = function(event, col,row){
alert(this.getCellValue(col,row) )
}
This topic is archived.