I have set SubMenuClosingDelay to 2 seconds in WebDataMenu Control. So the sub menu items will remain visible for 2 seconds after mouse hovering on parent menu.
When the user clicks some where else in the web page, menu items should be collapsed without considering the delay time. Currently it is not working as expected. Following is my code snippet:
<Infragistics:webdatamenu id="SalesMenu" runat="server" groupsettings-orientation="Horizontal" SubMenuClosingDelay="2000" > <GroupSettings Orientation="Horizontal"></GroupSettings> </Infragistics:webdatamenu>
How should I handle that event? Basically sub menu items should be collapsed when the user clicks the web page without considering the SubMenuClosingDelay.
Hello wijithaw ,
I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Thank you for posting in our forum.
Generally the closing delay will apply to any type of collapsing of the item regardless if it’s caused by clicking , unhovering or programatically.
That’s how the property works by design.
A possible workaround would be to call a private method: __hideItem to hide the item. For example:
function CloseMenu() {
var menu = $find('WebDataMenu1');
menu.get_activeItem().set_expanded(false);
menu.__hideItem(menu.get_activeItem());
}
This will immediately hide the menu.
You can hook it on window click for example: window.onclick = CloseMenu;
This will hide when you click anywhere on the page but would still allow the closing delay on unhover.
Let me know if that would work in your scenario.
Developer Support Engineer II