WebDataMenu EnableExpandOnClick doesn't seem to work correctly.
If I set EnableExpandOnClick = true, plus add an event for ItemClick, the root menu item never expands to show the child items. (See attached project.) Instead, the ItemClick event fires when the root item is clicked.
Here's the effect I'm trying to achieve:
1. User must click the root menu items to expand the menu.
2. The ItemClick event should never fire when the root item is clicked.
3. The ItemClick event should never fire when items with children are clicked.
This is just normal windows behavior. I'm just trying to make my WebDataMenu act normal, but I'm not sure how.
BTW, another bug: If you add <GroupSettings ExpandDirection="Down" />, the menu is not under root item. It goes to the far-left of the page.
Hi raywhite,
I want to let you know that I am looking into your inquiry. I will have an update for you on this, by or before Tuesday.
Thank you for contacting Infragistics!
Okay, this is actually expected behavior for when you are handling the server-side ItemClick event.
To achieve the behavior you are seeking, you need to handle client-side ItemClick event, and for the conditions that you don't want the server-side ItemClick event to fire (such as for those items that have children), you would then cancel the client-side ItemClick event.
For the second issue you mentioned regarding the behavior when ExpandDirection is set to 'Down', I do see this behavior reproducing on my end. This issue appears to be a development issue which our engineers will look at and correct. At that stage if a fix is required, it would be applied to the NetAdvantage 2011.2; 2012.1; and 2012.2 assemblies. NetAdvantage 2011.1 has completed its product life cycle and is no longer receiving fixes.
Thank you raywhite!
Let me know if you needed any additional assistance regarding this issue.
Thanks!
For the behavior you are seeking, can you give me an example for the behavior you are looking to emulate in Windows? So using MS Word or MS Excel (or other) show me the steps to follow to see the particular behavior you want to emulate. From what you are describing, I believe you are looking to see the root menu item to expand on click and a grandchild menu item to expand when hovering over a child menu item??
With regards to the issue where the menu expands to the far left side of the page when ExpandDirection is set to "Down", this is because having ExpandDirection set to "Down" the child menu items will cover other items of the root menu items (when GroupSettings-Orientation is set to 'Vertical' (default)). So:
1). When Orientation="Vertical" , ExpandDirection should be either "Left" or "Right"
2). When Orientation="Horizontal" , ExpandDirection should be either "Top" or "Down"
Please let me know if you need additional assistance regarding this matter.
**Please note that the ig_res folder which contains the sytel sheets was omitted due to file size constraints. For the proper styling of the menu, this folder will need to be imported to the project. To do so, open the project in the design view. When prompted to import the sytles select "OK".
This still doesn't make the menus act like Windows. In Windows, after you click the first time to open the first menu, they will always fly open as you browse over them. It looks like you don't have a mode to emulate this. But maybe I'm wrong. ???
BTW, here's the code I implemented, but it doesn't help much in emulating Windows:
function WebDataMenu1_ItemClick(sender, eventArgs){ if (eventArgs.getItem().hasChildren()) eventArgs.set_cancel(true);}
I have created a private support case for you to further follow-up on the ExpandDirection issue.