:: Forum >>

Date Template Format 2.0b3

Is there anykind of way that I could use to set my (date) format in (date) cell template?
lester
Thursday, April 13, 2006
Yes, using AW.Formats.Date class -

var date = new AW.Formats.Date;
    date.setTextFormat("dddd, dd-mmm-yy");

    var obj = new AW.UI.Grid;
    obj.setCellData("5/25/2006");
    obj.setCellFormat(date, 1);

    obj.setColumnCount(3);
    obj.setRowCount(3);

    document.write(obj);
Alex (ActiveWidgets)
Thursday, April 13, 2006
you didn't understand my question....
The problem is that I want to set my COlumn Format inside the template class..
so it would be initialized when template class is created...
lester
Thursday, April 13, 2006
Standard templates just request the text assuming that it is 'ready for display' and all necessary transformations are already done in the data model (value-to-text).

However you can build your own template which requests value instead and does value-to-text transformation in the template.
Alex (ActiveWidgets)
Thursday, April 13, 2006

This topic is archived.


Back to support forum

Forum search