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?
HI I looked thru your aspx page and i didnt see the AutoPostBackFlags.
Bring you project up in Visual Studio. The bring up the WebTree - set the following properties
AutoPostBack = false,
Expand AutoPostBackFlags property and set
NodeChanged = true
NodeChecked = false
NodeCollaspse = false
NodeExpand = false
NodeDropped = false
Here is my aspx postbackflags
<AutoPostBackFlags NodeChanged="True" NodeChecked="False" NodeCollapsed="False" NodeDropped="False" NodeExpanded="False" />
Here is my aspx code for the AutoPostBackFlags
Hi,
This is my code,
<script type="text/javascript" ><!--
<!--var treeidfunction UltraWebTree1_NodeClick(treeId, nodeId, button){ button1=event.srcElement; treeid = treeId; if (button == "2") {var x=(button1.offsetLeft+button1.offsetWidth)+100;var y=(button1.offsetTop+button1.offsetHeight)+100; igmenu_showMenu("UltraWebMenu1","",x,y); return true; }
}// -->
function UltraWebMenu1_ItemClick(menuId, itemId){ var item = igmenu_getItemById(itemId); var text = item.getText();
if (text == "rename Folder") { 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="" onnodechanged="Node_Changed" 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>
And i nave set the autoPostBack flag property to nodechanged.
HI, can you cut and paste your javascript code - what build of NetAdvantage are you using.
Hello,
Thanks for your replay.I have used your code.I have to modified the AutopostBackFlags properties.I have face the problem is when i select the node and select the option rename,it goed to execute client side menu_Click and immedietly goes to the Node_Changed event.I can't edit the node.How to resolve this problem.
HI,
You need to wire up the Server-Side NodeChanged event. You will also have to modify the UltraWebTree's AutoPostBackFlags properties. In the designer expand the AutoPostBackFlags property and set NodeChanged to true. This will cause a post back after you finish editing a node.
I am attaching my sample project.