How to catch "onKeyDown" & "onKeyUp" events in grid cell?

My requirement is to execute a custom function on grid cells editing. Basically on keyup not on onKeyPress nor onEditCell.

Thanks

you may try to use the similar code:

[code] mygrid.attachEvent(“onKeyPress”,onKeyPressed);

function onKeyPressed(code,ctrl,shift){
if (code==38){alert (“key Up pressed”)}
if (code==40){alert (“key Down pressed”)}
return true;

}[/code]

I don’t believe this works. Any other suggestions.