Radmenu Submenu not collapsing

4 posts, 0 answers
  1. HKJ
    HKJ avatar
    5 posts
    Member since:
    Sep 2015

    Posted 14 Jun Link to this post

    Hi,

    My page had two frames and the top frame has Radmenu, as a top navigation and the corresponding pages are displayed in the bottom frames

    Some of the menu has got sub menu. The problem is the sub menu options are not collapsing even if taget page is loaded in the bottom frame.

    I want the menu to collapse immediately after clicking or on mouse out. I tried OnClientMouseOut event and OnClientItemClicked event, but didnt work.

    Looking forward to hear from you.

     

     

    Regards,

    Hari

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    837 posts

    Posted 15 Jun Link to this post

    Hello Hari,

    Have you tried collapsing the items by calling the Menu's close() client-side method? If you have and the items are not collapsing could you isolate the Menu to a sample runnable page that demonstrates your scenario and post your markup and client-side methods, so we can further investigate the behavior of the control?

    Regards,
    Ivan Danchev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. HKJ
    HKJ avatar
    5 posts
    Member since:
    Sep 2015

    Posted 16 Jun in reply to Ivan Danchev Link to this post

    Dear Ivan,

     

    Thank you for your reply. I am using :

    OnClientMouseOut="OnClientMouseOut"

     

     and the function is 

    function OnClientMouseOut(sender, args) {
           args.get_item().close();
       }  

     

    My menu is

    <telerik:RadMenu ID="RMenu" runat="server" Skin="Vista" EnableRoundedCorners="true" CollapseAnimation-Type ="None"  EnableShadows="true" CssClass="menu" style="top: -22px;z-index:99999 ;" OnClientMouseOut="OnClientMouseOut" >
                                </telerik:RadMenu>

     

    I am thinking the issue is because of the two frames. If I can getting something to collapse sub menu as soon as my mouse move out, its wonderful.

     

    I am attaching the screenshot along with this. I have selected the submenu (in Frame 1)  which I have circled red in screenshot and the target page is loaded in the Frame 2, but still the menu is not collapsing.

    I hope this pictures gives you an idea.

    Regards,

    Hari

     

  5. Ivan Danchev
    Admin
    Ivan Danchev avatar
    837 posts

    Posted 20 Jun Link to this post

    Hello Hari,

    Instead of OnClientMouseOut I would suggest using the Menu's OnClientItemClick event for closing the items on click and the document's mouseleave event for closing the Menu is the user leaves the iframe:
    <telerik:RadMenu ID="RMenu" runat="server" CollapseAnimation-Type="None" EnableShadows="true" CssClass="menu" Style="z-index: 99999;" OnClientItemClicked="OnClientItemClicked">

    function OnClientItemClicked(sender, args) {
        if (args.get_item().get_level() != 0) {
            args.get_item().get_parent().close();
        }
    }
     
    $telerik.$(document).mouseleave(function () {
        var menu = $find("<%=RMenu.ClientID%>");
        menu.close();
    });

    Regards,
    Ivan Danchev
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top