var grid = new AW.UI.Grid;
grid.setControlSize(222, 200);
grid.setColumnProperty("count",2);
grid.setVirtualMode(false);
var colToDisplay = new Array(2);
var columnNames = new Array(2);
var formats = new Array(2);
colToDisplay[0]="pointDate";
columnNames[0]="Date";
grid.getCellTemplate(0).setStyle("text-align","center");
grid.setColumnWidth(100, 0);
var format = new AW.Formats.Date;
format.setTextFormat("dd.MM.yyyy hh:mm");
formats[0] = format;
colToDisplay[1]="pointVolume";
columnNames[1]="Volume [KG]";
grid.getCellTemplate(1).setStyle("text-align","right");
grid.setColumnWidth(100, 1);
var format = new AW.Formats.Number;
format.setTextFormat("#");
formats[1] = format;
grid.setHeaderText(function(i){return columnNames[i]});
grid.setCellFormat(formats);
var list = new AW.XML.Table;
list.setProperty("URL", "Some URL");
list.request();
list.setColumns(colToDisplay);
grid.setCellModel(list);
document.write(grid);
<table>
<tr>
</tr>
</table
<table width="648" height="325" cellpadding="0" cellspacing="3" align="left">
<tr>
<td>
...script with the grid...
</td>
</tr>
</table>
This topic is archived.