Home - Forums-.NET - FlyTreeView (ASP.NET) - Rendering inside a control that derives from UpdatePanel

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

Rendering inside a control that derives from UpdatePanel
Link Posted: 17-Nov-2009 07:41
I've got a fun one for you!

I've got a treeview that renders fine when placed inside , but when I place it inside  (a control that derives directly from UpdatePanel) it shows the tree content, but doesn't respond to javascript events (like mouse hover or click).

CustomUpdatePanel can be a control with no code, i.e. it doesn't change the behaviour of the UpdatePanel at all, and it still fails to work properly.

If a wrap the tree like so:

    
      
  

Then it works again.

From the behaviour, I'm guessing there's some code that says something like:
if (AncestorControl.GetType() == typeof(UpdatePanel))

Instead of:
if (AncestorControl is UpdatePanel)

Just a guess though!

I just found the ForceAjaxRenderer property, and I'm guessing that will fix my problem.
Link Posted: 17-Nov-2009 21:11
[quote="DaveSW"]
From the behaviour, I'm guessing there's some code that says something like:
if (AncestorControl.GetType() == typeof(UpdatePanel))

Instead of:
if (AncestorControl is UpdatePanel)

Just a guess though!

Actually, FlyTreeView does not reference AJAX library (to be able to work within .NET 2.0 environment without AJAX installed). So it compares string type names. And so it cannot detect UpdatePanel inheritors.

[quote="DaveSW"]I just found the ForceAjaxRenderer property, and I'm guessing that will fix my problem.

Yes, this is exactly what you need in this case.