<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script src="../util/controls/lib/aw.js" type="text/javascript"></script>
<link href="../util/controls/styles/vista/aw.css" rel="stylesheet">
<style type="text/css">
.aw-grid-row {height: 20px; border-bottom: 1px solid #DBDFE6}
.aw-grid-cell {border-right:1px solid #DBDFE6; padding-right:3px;font-size:12; font-family:Calibri}s
.aw-header-0 {font-size:12; font-family:calibri}
.aw-ff3 .aw-ui-button{
display: inline-block;
}
.aw-quirks * {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
</style>
</head>
<body>
</body>
</html>
<script>
var obj = new AW.UI.Grid;
obj.setHeaderText("header");
obj.setColumnCount(10);
obj.setRowCount(10);
obj.setCellEditable(true);
document.write(obj);
</script>
var editStarted;
var cellText;
var myEventHandler = function (event){
if(window.event) event = window.event; //for IE
if(editStarted){
cellText = cellText + String.fromCharCode(event.keyCode);
}
}
obj.onCellEditStarted = function(){
editStarted = true;
cellText = "";
}
obj.onCellEditEnded = function(text, col, row){
obj.setCellText(cellText, col, row);
obj.focus();
obj.selectCell(col, row);
}
obj.setEvent("onkeyup", myEventHandler);
This topic is archived.