onKeyTab kill event
Hi,
I tried to override the tab key functionality. Everything works fine when you have an editable cell. However if the cell is not editable the cell does not get focus and the tab takes the focus out. Behaves differently in Firefox and IE.
I tried to override the tab key functionality. Everything works fine when you have an editable cell. However if the cell is not editable the cell does not get focus and the tab takes the focus out. Behaves differently in Firefox and IE.
<script>
var myCells = [
["Cell text", "123", "5/18/2004"],
["More...", "456", "1/12/2006"],["Cell text", "123", "5/18/2004"],
["More...", "456", "1/12/2006"],["Cell text", "123", "5/18/2004"],
["More...", "456", "1/12/2006"]
]
var obj = new AW.UI.Grid;
obj.setCellText(myCells);
obj.setCellEditable(false); // all cells not editable
obj.setColumnCount(3);
obj.setRowCount(6);
obj.setController("myTabKeys", {
onKeyTab: "justalert",
onKeyShiftTab: "selectPreviousCell"
});
document.write(obj);
obj.justalert=function(){
var col = this.getSelectedColumns()[0];
var row = this.getSelectedRows()[0];
alert('called');
this.setSelectedRows([row]);
this.setSelectedColumns([col ]);
this.setCurrentRow(row);
this.setCurrentColumn(col );
}
</script>
Sandip
May 28,