Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
Need help with WebDataMenu collapsing
posted

I have a WebDataMenu that is working quite nicely.  My issue is that I don't want it to close if the user accidentally hovers off of the menuItems, but I do want it to close when they click on a menuItem.  I have the command for cancelling the collapse:

eventArgs.set_cancel(true)

but, I'm having trouble figuring out the correct way to mimic what I want.  The issue is that my WDM is several levels deep, and it is quite easy to accidentally move the cursor off of the items... causing the entire menu to collapse (which is a pain for the user).  Aside from preventing this behavior, I want the control to behave as normal.  I've gotten pretty close by allowing or cancelling the close based on Unhovered/Hovered/Selected events, but I keep getting instances where part of the menu a few levels deeper than where I left the menu try to stay open (with their parents).  Another perfectly acceptable solution would be to have enough of a delay before the menu closes that the user could catch get back on the menu and continue on.

So, to spell out my questions...

1. Is there a way to close the menuItems that are children of a particular item?

2. Is there a way to delay the close of menuItems so the user can get back on the menu without having to drill all the way back down to where they were?

Any other valid solutions to my issue are more than welcome.