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

Close Radmenu on on item click

0 Answers 64 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Syed
Top achievements
Rank 1
Syed asked on 22 Dec 2020, 02:31 PM

 

I have a Radmenu in my application and when I click the item I want to close the menu. Currently when I click the menu item stays open until I remove my mouse. But I want to close the menu when I click on the item. How can I achieve this? Below are some sample code I am trying to achieve but it is not working.

 

<telerik:RadMenu ID="Radtopmenu" runat="server" Width="100%" Height="32px" CssClass="radmenucss"
                        Duration="1" ClickToOpen="False" EnableRoundedCorners="true" EnableShadows="true"
                        OnClientItemClicked="hidechildmenuonclick">
</telerik:RadMenu>

 

<script type="text/javascript">
 
        function hidechildmenuonclick(sender, args) {
            //debugger;
            //return;
            if (args._item._children._array.length > 0) {
 
            } else {
                sender.close();
            }
        }
</script>

 

No answers yet. Maybe you can help?

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