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

OnClientMouseOver event not triggered if parent RadMenuItem is expanded

1 Answer 11 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Bianca
Top achievements
Rank 1
Bianca asked on 05 Aug 2019, 03:08 PM

Hello,

I am having a hard time triggering OnClientMouseOver event on parent RadMenuItem after the slide the slide containing the RadMenuItem children had been expanded. For example, take the picture below. When I hover over each sub menu item of Guitars menu item, I should have content of .rmSlide .rmVertical:before changed. It does that onClientMouseOver, but it does not change if I hover back from the slide menu items (like ClassicalGuitars, Steel String Guitars and so on) to the Guitars menu item. Is there any way I can do this easily, some functionality provided by the framework or what do you think it is the best practice in this case ? 

 

I am looking forward to your reply. 

Thank you! :)

 

1 Answer, 1 is accepted

Sort by
0
Eric R | Senior Technical Support Engineer
Telerik team
answered on 06 Aug 2019, 07:16 PM

Hi Bianca,

The style properties should only change when the menu has expanded and contracted. Although, I was able to trigger the OnClientMouseOver event after moving over every item in the menu.

Note that the client-side event handlers in UI for ASP.NET AJAX accept a sender and an arguments object. I recommend using these to work with the controls on the client-side. I have attached a sample and video demonstration to show this in more detail. Additionally, below is the markup that I used.

<script type="text/javascript">
    function OnClientMouseOver(sender, args) {
        console.log(sender);
        console.log(args);
    }
</script>
<div>
    <telerik:RadMenu ID="RadMenu1" runat="server" OnClientMouseOver="OnClientMouseOver">
        <Items>
            <telerik:RadMenuItem runat="server" Text="Main Menu">
                <Items>
                    <telerik:RadMenuItem runat="server" Text="Sub1">
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem runat="server" Text="Sub2">
                    </telerik:RadMenuItem>
                </Items>
            </telerik:RadMenuItem>
        </Items>
    </telerik:RadMenu>
</div>

For your reference, see the Client-Side Programming documentation for the RadMenu.

If the issue persists, I'll need to see the RadMenu implementation and ask that you provide the client-side scripts and the RadMenu markup. 

Please let me know if you need any additional information. Thank you and I look forward to your reply.

Regards,

Eric R
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Menu
Asked by
Bianca
Top achievements
Rank 1
Answers by
Eric R | Senior Technical Support Engineer
Telerik team
Share this question
or