onKeyPress values different in Internet Explorer than in Firefox

2 posts, 0 answers
  1. ranro
    ranro avatar
    50 posts
    Member since:
    Aug 2007

    Posted 05 Mar 2010 Link to this post

    I am using the OnKeyPress Clientevent in my grid.  I want to perform a particular action when the user press the CTRL+ SHIFT+ A buttons.  When I place the eventArgs.get_keyCode() call in an alert box I get the value of 65 for Firefox but I get the value of 1 for Internet Explorer.  We just upgraded to the ASP.NET Ajax controls and both IE and Firefox returned 65 in the old controls.  Is there any way to get them to both return 65 again. 
  2. Daniel
    Daniel avatar
    4949 posts

    Posted 08 Mar 2010 Link to this post

    Hello Randy,

    Please try the following:
    <telerik:RadGrid runat="server" ID="RadGrid1" onkeydown="handleKeyDown(this, event)">

    <script type="text/javascript">
        function handleKeyDown(sender, e)
            e = e || window.event;
            if (e.keyCode == 65 && e.ctrlKey && e.shiftKey)
                alert("CTRL + SHIFT + A pressed");

    I hope this helps.

    Best regards,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top