Hi all I am not able to fire event for Ultrawebmenu. I am using master page for my application. I am using Visual Studio 2008 and Infragistics version 8.2.20082.1000.
Below is my code
Region.aspx
Inherits="Pages_Region_Region" meta:resourcekey="PageResource1" CodeBehind="Region.aspx.cs" %>
<%@ Register Assembly="Infragistics35.WebUI.UltraWebNavigator.v8.2, Version=8.2.20082.1000, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
<asp:Content ID="Content2" ContentPlaceHolderID="Content" runat="Server">
//document.oncontextmenu=new Function("return false");// right click disable
function UltraWebTree1_NodeClick(treeId, nodeId, button){
//Add code to handle your event here.
var node = igtree_getNodeById(nodeId);
if(node == null)
return;
//force this node to be selected so actions in the popup are based on this node
node.setSelected(true);
//this textbox is for debugging to make sure we get the proper tag value
var txt = document.getElementById("Text1");
var tag=node.getTag();
var arr = tag.split("|");
var nodeType=arr[0];
txt.value=nodeType;
//Determine if the node clicked allows the popup menu option this information is stored in the Tag property
if(button == 2){
if(nodeType=='region')
{
var tree = igtree_getTreeById(treeId);
igmenu_showMenu('ctl00ContentUltraWebMenuRegion', tree.event);
return true;
}
if(nodeType=='subregion')
igmenu_showMenu('ctl00ContentUltraWebMenuSubregion', tree.event);
// -->
function GetNodeType(tag)
return arr[0];
function UltraWebTree1_DragStart(oTree, oNode, oDataTransfer, oEvent)
if(GetNodeType(oNode.getTag())!='country' && GetNodeType(oNode.getTag())!='subregion')
alert("You can only move countries and regions");
else
oDataTransfer.dataTransfer.setData("Text", oNode.getText());
oDataTransfer.dataTransfer.effectAllowed = "move";
function UltraWebTree1_Drop(oTree, oNode, oDataTransfer, oEvent){
var sourceNode = oDataTransfer.sourceObject;
if(!oNode.isChildOf(sourceNode))
var newNode=oNode.addChild(oDataTransfer.dataTransfer.getData("Text"));
newNode.setTag(sourceNode.getTag());
oNode.setExpanded(true);
CopyChildNodes(sourceNode,newNode);
if(sourceNode)
sourceNode.remove();
return false;
function CopyChildNodes(source,dest)
var nodes=source.getChildNodes();
if(nodes!="")
var i=0;
while (i < nodes.length)
var nodename=nodes[i].getText();
var newnode = dest.addChild(nodename);
i++;
function UltraWebTree1_AfterBeginNodeEdit(treeId, nodeId){
if(GetNodeType(node.getTag())!='subregion')
//alert(node.getTag());
var tree;
tree = igtree_getTreeById(treeId);
tree.endEdit(false);
<table style="height: 100%; width: 100%" border="0" cellspacing="0" cellpadding="0">
<td style="height: 2px; background-image: url(../../Images/MercerHR/dot.gif)" colspan="2">
</tr>
<td style="width: 10px">
<td>
<asp:ValidationSummary ID="ValidationSummary1" CssClass="ErrorTitle" HeaderText="Error information:"
<br />
<td style="height: 10px">
<td style="width: 100%" align="left" valign="top">
<tr>
<ignav:UltraWebTree ID="UltraWebTree1" runat="server" AllowDrag="True" AllowDrop="True"
BorderStyle="Solid" BorderWidth="1px" DefaultImage="ig_treeFolder.gif" DefaultSelectedImage="ig_treeFolderOpen.gif"
Editable="True" FileUrl="" Font-Names="Microsoft Sans Serif" Font-Size="9pt"
Width="298px">
</NodeEditStyle>
<DefaultImage Url="ig_treeFolder.gif" />
<ExpandImage Url="ig_treePlus.gif" />
</Images>
DragStart="UltraWebTree1_DragStart" Drop="UltraWebTree1_Drop" NodeClick="UltraWebTree1_NodeClick" />
<ignav:Level Index="0" />
</Levels>
<ignav:Node Expanded="True" TagString="root" Text="All Regions">
<ignav:Node TagString="region" Text="Africa">
<ignav:Node Expanded="True" TagString="region" Text="Americas">
<ignav:Node Expanded="True" TagString="region" Text="Asia">
<ignav:Node Expanded="True" TagString="region" Text="Europe">
</Nodes>
ForeColor="White">
</SelectedNodeStyle>
<ignav:UltraWebMenu ID="UltraWebMenuRegion" runat="server" JavaScriptFilename=""
JavaScriptFileNameCommon="" LeafItemImageUrl="/ig_common/images/LeafImage.bmp"
OnMenuItemClicked="UltraWebMenuRegion_MenuItemClicked" ParentItemImageUrl="/ig_common/images/LeafImage.bmp"
StyleSetName="" WebMenuTarget="PopupMenu" BackColor="#F0F0F0" BorderColor="#F0F0F0"
Font-Size="9pt" TargetFrame="" TargetUrl="" TopItemSpacing="Compact" TopSelectedClass="">
<ignav:Style BackColor="#303030" BorderStyle="Outset" BorderWidth="1px" CssClass="TopHover4"
<Margin Bottom="0px" Left="0px" Right="0px" Top="0px" />
<BorderDetails ColorBottom="255, 128, 0" ColorLeft="255, 128, 0" ColorRight="255, 128, 0"
StyleTop="Solid" WidthBottom="1px" WidthLeft="2px" WidthRight="1px" WidthTop="1px" />
<ignav:Style BorderColor="#F0F0F0" BorderStyle="Solid" BorderWidth="1px" CssClass="TopClass4">
</Styles>
Cursor="Default" Font-Names="MS Sans Serif" Font-Size="8pt" ForeColor="Black">
<HoverItemStyle BackColor="DarkBlue" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px"
</HoverItemStyle>
<ScrollTopDisabledImage Url="ig_menu_scrollup_disabled.gif" />
<LeafItemImage Url="/ig_common/images/LeafImage.bmp" />
<SubMenuImage Url="ig_menutri.gif" />
<ScrollBottomImage Url="ig_menu_scrolldown.gif" />
<Items>
</ignav:Item>
<DisabledStyle ForeColor="LightGray">
<Levels>
<ExpandEffects ShadowColor="DarkGray" Delay="100" RemovalDelay="500" Type="Slide" />
SubMenuDisplay="" />
<ignav:UltraWebMenu ID="UltraWebMenuSubregion" runat="server" JavaScriptFilename=""
OnMenuItemClicked="UltraWebMenuSubregion_MenuItemClicked" ParentItemImageUrl="/ig_common/images/LeafImage.bmp"
</td>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Save" />
(root, region, subregion, country). This information is critical and used to determine
if popups need to show up and the content)
<td align="left">
<sidebarbuttonstyle width="100px" />
<div id="divResult" runat="server">
</div>
Region.aspx.cs
3 function related to onmenuitemclick
//Get the next unique subregion name
string name = "New subregion";
count++;
//moves the child nodes of the deleted subregion to the above region
parentNode.Nodes.AddRange(oNode.Nodes);
parentNode.Nodes.Remove(oNode);