<script>
var myData = [
["row 0", 0]
]
var obj = new AW.UI.Grid;
obj.setCellData(myData);
obj.setColumnCount(2);
obj.setRowCount(1);
document.write(obj);
function addRow(){
// calc new row index
var i = myData.length;
// add row to the datasource
myData[i] = ["row " + i, i];
// update grid
obj.addRow(i);
}
var button = new AW.UI.Button;
button.setControlText("add row");
button.onControlClicked = addRow;
document.write("<br>" + button);
</script>
var myData = [];
var myData = Array();
<script>
var myData = [];
var obj = new AW.UI.Grid;
obj.setCellData(myData);
obj.setColumnCount(10);
obj.setRowCount(myData.length);
document.write(obj);
function addRow(){
// calc new row index
var i = myData.length;
// add row to the datasource
myData[i] = ["row " + i, i];
// update grid
obj.addRow(i);
}
var button = new AW.UI.Button;
button.setControlText("add row");
button.onControlClicked = addRow;
document.write("<br>" + button);
</script>
This topic is archived.