This is a migrated thread and some comments may be shown as answers.

onKeyPress values different in Internet Explorer than in Firefox

1 Answer 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ranro
Top achievements
Rank 1
ranro asked on 05 Mar 2010, 02:30 PM
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. 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 08 Mar 2010, 10:38 PM
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");
    }
</script>

I hope this helps.

Best regards,
Daniel
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.
Tags
Grid
Asked by
ranro
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or