Sunday, March 11, 2012

Error with treeview control in update panel new rtm asp.net altlas framework

Hi,

It is not related to the ajax update panel. It's an error that occurs on a page with no ajax features as well.

By the way, the treeview control is not supported in ajax update panel. You can notice a significant change in performance of your page when you place a larger treeview in the update panel.


The root cause of this issue is a javascript that is executed when you move your mouse pointer over or out the tree node since the treeview node uses OnMouseOver and OnMouseOut client events to switch its appearance. The associated with these events scripts are using an object named treeviewname_data as a parameter. This object is initialized at the end of the page in a loose javascript which is executed after the page is fully loaded in the browser window (not event in the client onload event).

When you click on a node it causes a postback, the page is reloaded and your coursor is (usually) still in the same place as it was when you clicked. The tree is being rendered under your mouse pointer and onmouseover event is fired. Since the page did not even get to that javascript that initializes treeviewname_data, you get the error from the subject.

I guess it's a bug in the treeview asp control.

No comments:

Post a Comment