UltraWebMenu_MenuItemClicked and know what was clicked . . . . but only for top level and 1 level down menus . . .
why doesn't UltraWebMenu_MenuItemClicked fire for
-sub -sub (flyout) menu selections ????
Thx,
XPXJ
Infragistics35.WebUI.UltraWebNavigator.v8.3, Version=8.3.20083.1009
Dear MTraynor,
When trying to run your sample I get the following error (What assembly am I missing? I already have
Infragistics35.WebUI.Shared.v8.3, Infragistics35.WebUI.UltraWebNavigator.v8.3):
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0234: The type or namespace name 'Style' does not exist in the namespace 'Infragistics.WebUI.Shared' (are you missing an assembly reference?)Source Error:
Line 234: Line 235: [System.Diagnostics.DebuggerNonUserCodeAttribute()] Line 236: private void @__BuildControl__control3(Infragistics.WebUI.Shared.Style @__ctrl) { Line 237: Line 238: #line 30 "C:\PMJ - 02-11-09\INFRAGISTICS - 02-11-09\UltraWebMenu - 02-25-09\MTraynor - 03-02-09\MTraynor\Default.aspx"
Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\23a5c553\2b8bb871\App_Web_default.aspx.cdcab7d2.wus_qo0b.0.cs Line: 236
It must have something to do with the involvement of a MasterPage.
In 20814 [Infragistics] Ivan Baev hasn't quite gone deep enough in menu-ing (3 levels) in his test app to exhibit the problem.
(If javascript is the only workaround any script that will toggle the visibility of the ContentPlaceHolder(s) would be greatly appreciated.)
===============================================================
BTW: my project is in VB.
can i give you my "problem" project as an attached file ?
Please note that your test proj only has 2 levels of menu-ing.
Your test does NOT replicate my situation in that you only have 2 levels of menu-ing: "Top Item" and "Sub Menu Item".
To test my situation YOU MUST HAVE A 3rd LEVEL OF MENU-ING (i.e. a "fly-out").
can you create a .ZIP of your test with 3 levels of menu-ing ?
see also: http://news.infragistics.com/forums/t/20814.aspx
Yes . . . I have been playing with the javascript from https://ko.infragistics.com/community/forums/f/ultimate-ui-for-wpf/41895/mouse-right-click-selection#41895
Perhaps it makes a diffference that the UltraMenuBar is on a Master Page (Inherits System.Web.UI.MasterPage)
???
but I'm definitely NOT getting a break for the -sub -sub (flyout)s IN:
Private Sub CDBG_UltraWebMenu_MenuItemClicked(ByVal sender As Object, ByVal e As Infragistics.WebUI.UltraWebNavigator.WebMenuItemEventArgs) Handles CDBG_UltraWebMenu.MenuItemClicked
ContentPlaceHolder1.Visible = e.Item.Tag =
"crs"
ContentPlaceHolder2.Visible = e.Item.Tag =
"frs"
End Sub
(I will test with your code just to say I believe you).
HI ,
My Client-Size Item_click event fires for all levels. The ItemId of the ItemClick event has the full path of the menu index appended to it.
You can also get the level number by using the MenuItems getLevel method. You can also use the getText method to get the menu text.
Here is the code to my aspx page: (I tested clr 3.5 as well)
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Infragistics2.WebUI.UltraWebNavigator.v8.3, Version=8.3.20083.1009, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.UltraWebNavigator" TagPrefix="ignav" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title>
<script type="text/javascript" id="igClientScript"><!--
function UltraWebMenu1_ItemClick(menuId, itemId){ //Add code to handle your event here. debugger; alert(itemId); var item = igmenu_getItemById(itemId); alert(item.getLevel());
}// --></script></head><body> <form id="form1" runat="server"> <div> <ignav:UltraWebMenu ID="UltraWebMenu1" runat="server" JavaScriptFilename="" JavaScriptFileNameCommon="" WebMenuTarget="VerticalMenu"> <IslandStyle BackColor="LightGray" BorderStyle="Outset" BorderWidth="1px" Cursor="Default"> </IslandStyle> <HoverItemStyle BackColor="DarkBlue" Cursor="Default" ForeColor="White"> </HoverItemStyle> <Images> <SubMenuImage Url="ig_menuTri.gif" /> </Images> <ItemStyle Cursor="Default"> <Padding Left="0px" /> </ItemStyle> <Items> <ignav:Item Text="Top Item"> <Items> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> <Items> <ignav:Item Text="policy"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> </Items> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> </Items> </ignav:Item> <ignav:Item Text="Top Item"> <Items> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> </Items> </ignav:Item> <ignav:Item Text="Top Item"> <Items> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> </Items> </ignav:Item> </Items> <DisabledStyle Font-Names="MS Sans Serif" Font-Size="8pt" ForeColor="Gray"> </DisabledStyle> <Levels> <ignav:Level Index="0" /> <ignav:Level Index="1" /> <ignav:Level Index="2" /> </Levels> <SeparatorStyle BackgroundImage="ig_menuSep.gif" CssClass="SeparatorClass" CustomRules="background-repeat:repeat-x; " /><ExpandEffects ShadowColor="LightGray"></ExpandEffects>
<MenuClientSideEvents ItemClick="UltraWebMenu1_ItemClick"></MenuClientSideEvents> <ParentItemStyle> <Padding Left="0px" Right="10px" /> </ParentItemStyle> </ignav:UltraWebMenu> </div> </form></body></html>