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
665
Ultraweb Tree add new folder problem
posted

I have use the infragistics ultrawebtree and and i was use the ultrawebmenu for add a new folder.(it will open when i right click the selected node).It works fine.But when i use this menu for rename the node it doesnt work.I need to rename the node text when i right click the node it shows thw ultrawebmenu as a popup,i have the option rename folder,when i click the the selected tree node is changed to edittable.How to do that?

  • 28407
    posted

    HI,

     I created a sample website with a tree and popupmenu.  When the  selected node is right clicked a context menu appears with a rename option - when rename is selected -  the selected node text goes into edit mode.

    <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

    <%@ Register assembly="Infragistics2.WebUI.UltraWebNavigator.v8.2, Version=8.2.20082.2110, 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" >
    <!--

    <!--
    var treeid
    function UltraWebTree1_NodeClick(treeId, nodeId, button){
     //Add code to handle your event here.
     
     treeid = treeId;
     if (button == "2")
      {
      igmenu_showMenu("UltraWebMenu1", event);
      return true;
     }

     
    }
    // -->

    function UltraWebMenu1_ItemClick(menuId, itemId){
     //Add code to handle your event here.
     var item = igmenu_getItemById(itemId);
     var text = item.getText();

     if (text == "rename")
     {
      var tree = igtree_getTreeById(treeid)
         var snode = tree.getSelectedNode();
         snode.edit();
     }
    }
    // -->
    </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
       
            <ignav:UltraWebTree ID="UltraWebTree1" runat="server" DefaultImage=""
                HiliteClass="" HoverClass="" Indentation="20">
                <ClientSideEvents NodeClick="UltraWebTree1_NodeClick" />
                <Levels>
                    <ignav:Level Index="0" />
                </Levels>
                <Nodes>
                    <ignav:Node Text="Root Node">
                        <Nodes>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                        </Nodes>
                    </ignav:Node>
                    <ignav:Node Text="Root Node">
                        <Nodes>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                        </Nodes>
                    </ignav:Node>
                    <ignav:Node Text="Root Node">
                        <Nodes>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                        </Nodes>
                    </ignav:Node>
                    <ignav:Node Text="Root Node">
                        <Nodes>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                            <ignav:Node Text="Child Node">
                            </ignav:Node>
                        </Nodes>
                    </ignav:Node>
                </Nodes>
            </ignav:UltraWebTree>
            <ignav:UltraWebMenu ID="UltraWebMenu1" runat="server" WebMenuTarget="PopupMenu">
                <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" />
                <Items>
                    <ignav:Item Text="rename">
                    </ignav:Item>
                    <ignav:Item Text="Top Item">
                    </ignav:Item>
                </Items>
                <DisabledStyle Font-Names="MS Sans Serif" Font-Size="8pt" ForeColor="Gray">
                </DisabledStyle>
                <Levels>
                    <ignav:Level Index="0" />
                </Levels>
                <SeparatorStyle BackgroundImage="ig_menuSep.gif" CssClass="SeparatorClass"
                    CustomRules="background-repeat:repeat-x; " />
    <ExpandEffects ShadowColor="LightGray"></ExpandEffects>
                <MenuClientSideEvents ItemClick="UltraWebMenu1_ItemClick" />
            </ignav:UltraWebMenu>
       
        </div>
        </form>
    </body>
    </html>