3.2.0

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(number, 1);

    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)
January 15,
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
January 15,

This topic is archived.

See also:


Back to support forum