:: Forum >> Version 2 >>

AW.Format in controls, not in Grid

Hey there, I found lots of info about formats in grid, but never for controls...

I want to reproduce :

var obj = new AW.UI.Grid;

    
obj.setCellText(data);
    
obj.setColumnCount(2);
    
obj.setRowCount(3);

    var 
number = new AW.Formats.Number;
    
obj.setCellFormat(number1);

    
document.write(obj);  
Like :

var obj = new AW.UI.Input;
    var 
number = new AW.Formats.Number;

    
obj.setCellFormat(number);//DOESN'T WORK

    
obj.setFormat(number);//DOESN'T WORK

    
document.write(obj);  
Any ideas?
Jean Michel (Paris)
Sunday, January 15, 2006
Try

var obj = new AW.UI.Input;
var 
number = new AW.Formats.Number;
obj.setControlFormat(number); 
document.write(obj);  
 
Inputs don't have cells. setCellFormat is not a method for AW.UI.Input. I think you may have to use one of the obj.onControlFormatChanging or obj.onControlFormatChanged method as well to make it actually work, but I couldn't get it to work as I have never used the formatting before.
Tony
Sunday, January 15, 2006



This topic is archived.

Back to support forum

Forum search