Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
KeyDown KeyUp event not capture Enter or Tab Keys
posted

Hi,

I handled the keydown and keyup event from webdatagrid. This events capture all the keys but not capture enter or key tab. What can do it??

<ClientEvents Initialize="wdgDocumentos_Initialize" KeyDown="wdgDocumentos_KeyUp" KeyDown="wdgDocumentos_KeyDown" />


function wdgDocumentos_KeyUp(webDataGrid, args) {
try {
var keyCode = args._props[0].keyCode;
document.getElementById('<%=this.avanzarCelda.ClientID %>').value = keyCode;
}
catch (err) { }
finally {}
}


function wdgDocumentos_KeyDown(webDataGrid, args) {
try {
var keyCode = args._props[0].keyCode;
document.getElementById('<%=this.avanzarCelda.ClientID %>').value = keyCode;
}
catch (err) { }
finally {}
}

 

 

 

  • 33839
    Suggested Answer
    posted

    Hi,

    I just checked out one of my test pages.  I did indeed get the key down event to fire for both enter and tab.  However, I get the keycode from args.get_browserEvent().keyCode.  I also see it in the code you provide.  It is possible that you have on other behaviors that are taking enter and tab first?  I tested with just activation on.  What does your grid source look like?

     

    regards,
    David Young