Capture key Enter on pressed in a grid
I have a grid and it would like to capture the key "enter" when it was
pressed, I tried the code below but it didn't work. Could you help me?
grid.refresh();
grid.setEvent("onkeypress", function(e) {
var keycode;
if (window.event) keycode = window.event.keycode;
else if (e) keycode = e.which;
if (keycode=13) {
Alert("Enter");
}
});
Thanks.
pressed, I tried the code below but it didn't work. Could you help me?
grid.refresh();
grid.setEvent("onkeypress", function(e) {
var keycode;
if (window.event) keycode = window.event.keycode;
else if (e) keycode = e.which;
if (keycode=13) {
Alert("Enter");
}
});
Thanks.
Lourival Queiroz
September 11,