Monday, March 26, 2012

UpdatePanel + TreeView + CSS Adapters dont work?

Hi There

I have been developing an interface which uses a TreeView on the left, and a main panel on the right.

During development everything has been fine. I implimented CSS Adapters, and had all events firing correctly. basically when you select a node in the tree on the left, the content on the right changes. Simple.

However, I have now wrapped my treeview and main panel in UpdatePanels. I have setup the triggers accordingly.

If I select items in the main panel (ie breadcrumbs in the bread crumb trail) the treeview acts accordingly.

However, if I select nodes in the tree, my main panel doesnt update. I set a breakpoint in my code behind to check if the select in event in the tree is being fired. There is a post back happening, as the Page_Load event is fired, however my Select node event is not fired.

I removed the CSS adapters, and this functionality works correctly.

So there is some problem between UpdatePanel and Treeview with CSS adapter.

Could it be that the adapted treeview needs to use the event OnAdaptedSelectedNodeChanged, but I cant add this as a trigger for the UpdatePanel on the right hand side.

Has anyone else has a problem like this?

Thanks

PaulTAG

Did you register the css friendly adapters java script files with the script manager?

Hi There

Yes the Javascript for the treeview adapter has been registered.

I have since found out that the TreeView control is not supported for use inside an UpdatePanel.

It just seems strange to me that the Selected Node Changed event isnt fired for an adapted treeview inside an UpdatePanel, but a Non Updated treeview does seem to fire that event.


No comments:

Post a Comment