RadMenu does not close

2 posts, 0 answers
  1. Ken
    Ken avatar
    1 posts
    Member since:
    Aug 2016

    Posted 18 Mar Link to this post

    I have a radmenu in a template column. When clicking on one in a row then clicking on another is a different row the first one does not close.

    See attached.

  2. Rumen
    Admin
    Rumen avatar
    14391 posts

    Posted 19 Mar Link to this post

    Hi Ken,

    You can use the item blur event of the menu to close the popup, e.g.

     

       <script type="text/javascript">
    
            function OnClientItemBlurMenu(sender, args) {
                setTimeout(function () {
                    sender.close(true);
                }, 200);
            }
    
            function OnClientMouseOverHandler(sender, eventArgs) {
                if (eventArgs.get_item().get_parent() == sender) {
                    sender.set_clicked(false);
                }
            }
        </script>
    
    
         <telerik:RadMenu RenderMode="Classic" ID="RadMenu1" runat="server" ClickToOpen="true" ExpandAnimation-Type="None"
                    ExpandAnimation-Duration="0" CollapseAnimation-Duration="0" EnableEmbeddedSkins="false"
                    OnClientItemBlur="OnClientItemBlurMenu"
                    OnClientMouseOver="OnClientMouseOverHandler">
                  <Items>
                          <telerik:RadMenuItem ImageUrl="image.png"></telerik:RadMenuItem>
                 </Items>
         </telerik:RadMenu>

     

    Regards,
    Rumen
    Progress Telerik

    Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
Back to Top