Using RadMenu's, submenu is getting expanded on click but if I click on other submenu previous one is not getting collapsed and it remain open only.
I tried below javascript, got it from Telerik forums. It is working for level 1 menu items not for submenu items (level 2 menu items) and sub-submenu items(level 3 items) also.
I have to click twice on level 2 items to open level 3 items.
Code:
<script type="text/javascript">
function onClientItemClicked(sender, args) {
sender.close(true);
}
function OnClientMouseOverHandler(sender, eventArgs) {
if (eventArgs.get_item().get_parent() == sender) {
sender.set_clicked(false);
}
}
</script>
<telerik:RadMenu ID="SampleMenu" runat="server" Skin="Product" RenderMode="Lightweight" ShowToggleHandle="true" AppendDataBoundItems="true" EnableEmbeddedSkins="false" EnableRoundedCorners="true" EnableShadows="true" ExpandDelay="300" ExpandAnimation-Type="InSine" Flow="Vertical" OnClientItemClicked="OnClientItemClicked" OnClientMouseOver="OnClientMouseOverHandler">
</telerik:RadMenu>
Hi Snehal,
Could you please try disabling the ShowToggleHandle property? When the orientation(Flow) of the Menu is set to Vertical, the handle is always visible.
Please let me know how this affects the behavior.
Thank you very much Doncho!! It worked.
I set ShowToggleHandle property to false.