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

Enter key event for RadMenuItem

0 Answers 55 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Bhavik
Top achievements
Rank 1
Bhavik asked on 30 Dec 2011, 03:08 AM
Hi,

I am using RadMenu for my website. I want to make the menu entirely keyboard friendly. Using AccessKey I can Navigate to a specific menu item but pressing Enter key does not do any thing. I want to fire the same event with the enter key which fires when we click the menu item.
Following is my code snippet:

<radM:RadMenu ID="RadMenu1" runat="server" UseEmbeddedScripts="False" Skin="System"
                                            CausesValidation="False" OnClientItemFocus="OnClientItemFocus">
                                            <Items>
                                                <radM:RadMenuItem ID="RadMenuItem_Home" runat="server" Text="Home"   NavigateUrl="Default.aspx">
                                                </radM:RadMenuItem>
                                                <radM:RadMenuItem ID="RadMenuItem_Create" runat="server" Text="Create" AccessKey="C">
                                                    <Items>
                                                        <radM:RadMenuItem ID="abc" runat="server" Text="abc"
                                                            NavigateUrl="abc.aspx">
                                                        </radM:RadMenuItem>
                                                        <radM:RadMenuItem ID="xyz" runat="server" NavigateUrl="xyz.aspx"
                                                            Text="xyz">
                                                        </radM:RadMenuItem>                                                      
                                                    </Items>
                                                </radM:RadMenuItem>
<radM:RadMenu>

Here when the focus is on Menu Item "xyz", when I press enter, I want it to navigate to URL: xyz.aspx

Thanks,
Bhavik

No answers yet. Maybe you can help?

Tags
Menu
Asked by
Bhavik
Top achievements
Rank 1
Share this question
or