Home - Forums-.NET - FlyTreeView (ASP.NET) - Rename Node

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Rename Node
Link Posted: 22-Jul-2008 04:34
Hi,

i use Version: 3.3.0.11

I successfully added to my old FlyTree an Javascript Prompt whitch renames the Node and makes an postback to persist it to an database.

In first example it works:
          Key="mnuRename" AutoPostBack="True" Text="Umbenennen">

But now I tryed to make the same to another ContextMenu:
          Key="mnuRenamePage" AutoPostBack="true" Text="Umbenennen">

And it does not work.
I see befor postback, that the node gets clientside renamed, but when I gatter the Text of the Node it keeps old:
FileTree.FindNode(e.NodeKeyList).Text;

What is the requirement to get serverside the changed NodeText?
I can't see any difference between these two Menus.

Regards,
Mansur

PS: Below some more code.

The full Code of the working Tree/ContectMenu:
                Font-Size="X-Small" Font-Names="Arial" Padding="1" IconSetPath="winxp/"
                ClientRuntimePath="/system/ninerays_web_ui_webcontrols_flytreeview_3_3_0_0/"
                OnNodeEvent="NavigTree_NodeEvent" BorderStyle="none" EnableViewState="false">
                                  PostBackOnCollapse="False" PostBackOnExpand="False" DragDropJavascript="return true;" HoverStyle="padding: 2px 4px 2px 4px; FONT-FAMILY: Tahoma; FONT-SIZE: 11px; cursor: hand; TEXT-DECORATION: underline;"
                  PostBackOnDeselect="False" SelectedExpandedImageUrl="winxp/selected.gif" NavigateUrl="" ImageUrl="winxp/default.gif"
                  CanBeSelected="True" DragDropName="Nav" ContextMenuID="NavigContextMenu" DragDropAcceptNames="Nav"
                  SelectCollapses="False" PostBackOnSelect="False" SelectedImageUrl="winxp/default.gif" ExpandedImageUrl="winxp/selected.gif"
                  PostBackOnUncheck="False" PostBackOnCheck="False" DefaultStyle="padding: 2px 4px 2px 4px; FONT-FAMILY: Tahoma; FONT-SIZE: 11px;"
                  SelectExpands="True" SelectedStyle="padding: 1px 3px 1px 3px; border: #aaaaaa 1px solid; FONT-FAMILY: Tahoma; FONT-SIZE: 11px; background-color: whitesmoke; cursor: hand;">
              


        
        
        
                  Key="mnuRename" AutoPostBack="True" Text="Umbenennen">
        
                  Key="mnuAddChild" AutoPostBack="True" Text="Navigationspunkt hinzufugen">
        
        Ý
Position rauf">
        ß Position runter">
        
        
        
      


And the code of the not working version:

                Font-Size="X-Small" Font-Names="Arial" Padding="1" IconSetPath="winxp/" ClientRuntimePath="/system/ninerays_web_ui_webcontrols_flytreeview_3_3_0_0/"
                BorderStyle="none" EnableViewState="false" >
                                  PostBackOnCollapse="False" PostBackOnExpand="False" DragDropJavascript="return true;" HoverStyle="padding: 2px 4px 2px 4px; FONT-FAMILY: Tahoma; FONT-SIZE: 11px; cursor: hand; TEXT-DECORATION: underline;"
                  PostBackOnDeselect="False" SelectedExpandedImageUrl="page.gif" NavigateUrl="" ImageUrl="page.gif"
                  CanBeSelected="True" DragDropName="" ContextMenuID="PageContextMenu" DragDropAcceptNames="File" SelectCollapses="False"
                  PostBackOnSelect="False" SelectedImageUrl="page.gif" ExpandedImageUrl="page.gif" PostBackOnUncheck="False"
                  PostBackOnCheck="False" DefaultStyle="padding: 2px 4px 2px 4px; FONT-FAMILY: Tahoma; FONT-SIZE: 11px;"
                  SelectExpands="True" SelectedStyle="padding: 1px 3px 1px 3px; border: #aaaaaa 1px solid; FONT-FAMILY: Tahoma; FONT-SIZE: 11px; background-color: whitesmoke; cursor: hand;">
              


        
        
        
        
Link Posted: 22-Jul-2008 05:10
Hi,

According to
http://www.9rays.net/asp.net_2/treeview/miscpages/doc/ClientObjects.aspx
You should use getText/setText functions in order to set Text property.
After you set it, it should be reflected at server side (after postback of course).
Link Posted: 22-Jul-2008 20:17
Hi,

sorry but I get an JavaScript Error telling: The Object does not support this Property or Method.

As I allready told I user Assembly Version: 3.3.0.11

I dont think that the Assembly does support any of these Client Functions. I think this are Methods of an newer Version.

Am I wrong?

Regards,
Mansur
Link Posted: 23-Jul-2008 08:07
Yes,  you're right. I missed this.

I studied your code. Both treeviews also seem to be identical. Is there any difference in other parts of pages?