Home - Forums-.NET - FlyTreeView (ASP.NET) - Inplace Editing of Tree Node Label

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

Inplace Editing of Tree Node Label
Link Posted: 13-Jan-2008 07:53
I have looked at the previous posts on this topic - the information seem to be outdated there. Here is what I would like to accomplish:
- Add a context menu item using
- Once the user is done editing the node inplace using the above menu item, a server postback has to be made to update the database.

Could you please provide sample code for this?  I tried using  but have not been able to get it to work. Could you please provide a sample with the .aspx and .aspx.cs files for this case?

Thanks in advance,
RJ.
Link Posted: 13-Jan-2008 08:07
This is treeview for ASP.NET 1.1 version demo.
Client-side API of which was redesigned in flytreeview for ASP.NET 2.0 version.

Also, ASP.NET 2.0 version of the control, does not provide inline node editing, anyway you can create a popup dialog  using context menu to edit node contents.

Please let me know, if you're interested, so I can post you a sample code here for this.
Link Posted: 13-Jan-2008 18:27
Yes. It would be great if you could provide the sample code for that. Thanks.
RJ.
Link Posted: 13-Jan-2008 21:36
ok,

I took default demo_office2003.aspx file.
Added context menu item:
[/code]
and here is EditNode function itself:

[code]



Hope this helps.
Link Posted: 14-Jan-2008 04:23
Thanks, the popup is showing up correctly. Couple of questions though:
- The pop up input box is showing up on the top left of the screen. Can that input box be positioned at the center of the screen?
- Once the settext is called, I was expecting a postback to the server since I had wired a function to the "NodeTextChanged" event. That event does not seem to get fired. Is there another way to post back to the server after setText?
Link Posted: 14-Jan-2008 04:34
[quote="acrodelon"]Thanks, the popup is showing up correctly. Couple of questions though:
- The pop up input box is showing up on the top left of the screen. Can that input box be positioned at the center of the screen?

Unfortunatelly, the prompt function does not allow positioning.


[quote="acrodelon"]
- Once the settext is called, I was expecting a postback to the server since I had wired a function to the "NodeTextChanged" event. That event does not seem to get fired. Is there another way to post back to the server after setText?

Yes, just add node.getTreeView().postBack() at the end of the function.
Link Posted: 14-Jan-2008 05:13
It worked. Thanks for the quick and accurate support!