:: Forum >>

alert(RowIndex) on Keydown 'Enter'

Can anyone explain how you make an alertbox displaying the rowindex then pressing the Enter key on the selected row?
Lasse
Wednesday, March 8, 2006
Found out my self.

Here it goes for those of you with the same problem.

var defaultEventHandler = obj.getEvent("onkeydown");
obj.setEvent("onkeydown", function(e){
if(event.keyCode==13){
var rowid = obj.getSelectedRows()
alert(rowid);
event.returnValue = false;
}
else{
defaultEventHandler.call(this, event);
event.returnValue = false;
}
} );
Lasse
Wednesday, March 8, 2006

This topic is archived.


Back to support forum

Forum search