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

RadMenu does not close

1 Answer 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 18 Mar 2020, 10:35 PM

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.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Mar 2020, 12:16 AM

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.
Tags
Grid
Asked by
Ken
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or