3.2.0

AW.Grid.Extended addRow() not working

Should addRow() work with AW.Grid.Extended?

Im trying it and it doesnt seem to work. Even if I update the sample code and try it fails.

<script>

var myData = [
["row 0", 0]
]

var obj = new AW.Grid.Extended;
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>
Marco B.
November 4,
// update grid
obj.addRow(i);
obj.setRowCount(myData.length);

obj.refresh();
}
November 4,

This topic is archived.

See also:


Back to support forum