Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using jsgrid and i need tab press or up/down arrow key press event from keyboard (when jsgrid is in editable mode) in jquery.

What I have tried:

<script>
$("input").keydown(function (e) {
debugger;
if (e.which === 9)
alert("Hurray!!!");
});
</script>

above code snippet is not working.I think this happens due to jquery/css make grid row editable but above code snippet is unable to find input.

live example of tab press is http://jsfiddle.net/QfCpC/1/
Posted
Updated 15-Mar-16 22:19pm

1 solution

C#
<script type="text/javascript">
       document.onkeyup = PresTab;
 
       function PresTab(e)
       {
           var keycode = (window.event) ? event.keyCode : e.keyCode;
           if (keycode == 9)
           alert('tab key pressed');
       }
 
   </script>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900