what kind of fail ? do you have an error or it does not fires?
I use the same procedure, even if with a different syntax:
$('#dg').datagrid('getPanel').bind({'keydown' :
function (e) {
alert(e.keyCode); }
});
Anyway there could be some hurdle:
in my case, I use cell-editing extension and when in edit mode, the keystroke is captured by the extension and not bubbled. so I have to bind the keydown ALSO into the cell editor textbox
may be it's also your case...
HTH
RIc