Setting cell contents with setCellText - not updating screen
In a onCellValidated event, I'm trying to set the cell's contents, overriding what is there. obj.setCellText(value, col, row) works OK but does not refresh the screen (though a column sort will show the new data.). So I tried obj.refresh() after the setCellText, and that caused a Javascript error "Line 31 Error e.parentNode is null or not an object".
Here's some sample code:
<script>
var obj = new AW.UI.Grid;
obj.setSize(800, 250);
obj.setCellText(function(i, j){return j + "-" + i});
obj.setHeaderText("header");
obj.setColumnCount(10);
obj.setRowCount(100);
obj.setCellEditable(true);
obj.onCellValidated = function(value, col, row){
obj.setCellText("x", col, row);
obj.refresh();
}
document.write(obj);
</script>
Here's some sample code:
<script>
var obj = new AW.UI.Grid;
obj.setSize(800, 250);
obj.setCellText(function(i, j){return j + "-" + i});
obj.setHeaderText("header");
obj.setColumnCount(10);
obj.setRowCount(100);
obj.setCellEditable(true);
obj.onCellValidated = function(value, col, row){
obj.setCellText("x", col, row);
obj.refresh();
}
document.write(obj);
</script>
LanceH
April 17,