Home - Forums-.NET - FlyTreeView (ASP.NET) - FlyTreeView with Ajax on page

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

FlyTreeView with Ajax on page
Link Posted: 07-Dec-2006 10:39
This may be more an Ajax related question, however here goes.

I know that the FlyTreeView cannot be put inside an UpdatePanel (it bombs and EvgenyT stated in a previous post that it didn't work).

However,  what I would like to do under certain circumstances is force the FlyTreeView to be part of an update.

For example, I have a button in a GridView in an UpdatePanel that expands the tree. All the code works as it used to, and the UpdatePanel updates as it is supposed to. All the nodes in the tree are populated (seen in debug).  However because only the UpdatePanel is updated, the FlyTreeView outside of the UpdatePanel is not.

Can anyone think of a technique to force the FlyTreeView to also be part of the page update (and thus show the expansion of the tree)? I'd even accept that button doing a full postback, but I can't seem to make this work with Triggers etc. Since it is in a GridView where other buttons do benefit from Ajax, it can't be moved outside the UpdatePanel

Actually it would just be nice if the FlyTreeView could be put in the UpdatePanel, but ....

Thanks  in advance...
Link Posted: 07-Dec-2006 13:40
Probably not cool to reply to your own question, begs the question of why you had to ask.  Guess I was just raising the need to have FlyTreeView be Ajax compatible.

Otherwise I found that I in RowCreated event use FindControl and the ScriptManager RegisterPostBackControl to force a button in a GridView to do a full postback. Result the FlyTreeView gets updated, albeit with a regular time consuming postback. Other buttons affect the UpdatePanel only.
Link Posted: 07-Dec-2006 20:40
Yes, current version is not compatible.
It uses some ASP.NET rendering features that are not allowed in partial rendering of ATLAS(aka AJAX) like:
- registering onsubmit handler
- registering startup script
- registering other client-side code blocks
- registering sets of stylesheets in the Page.Header control
- etc.

AJAX restricts custom controls in many ways, and now we have to deal with this.

Currently we're in the process of some architectural redesign of FlyTreeView control to let it render for the UpdatePanel. Hope that we will succeed. We're required to succeed
Link Posted: 14-Mar-2007 07:39
And what if I just need the selectednodechanged event to be only a trigger for an updatepanel beside the treeview ?

I get a javascript alert telling me that the viewstate is not correct, and the treeview freezes.

Is it possible to refresh the treeview's viewstate, i suppose only the selectednode has changed ?

Shall I abandon all hope ?
Link Posted: 14-Mar-2007 08:21
We have beta version compatible with UpdatePanel:

http://download.9rays.net/treeview_asp.net_2/flytreeview_asp2_test42.zip