Home - Forums-.NET - FlyTreeView (ASP.NET) - Disabling ViewState

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

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

Disabling ViewState
Link Posted: 17-Apr-2010 02:59
Hi, we need to disable viewstate to enhance AJAX performance, after setting viewstate to false we start getting the following alert error message:
"Error when performing server call back:
FlyTreeView internal exception(code 88541). Please report the problem.s"

Please help.
Link Posted: 18-Apr-2010 23:01
You're trying to use load-on-demand and this requires viewstate, because FlyTreeView requires treeview structure to be restored from viewstate in order to give it to you in PopulateNodes event.

So you need to use either viewstate+populatenodes or disable viewstate and don't use PopulateNodes.
Link Posted: 19-Apr-2010 10:40
I got your point but we are confused why the tree need its structure to populate it on demand if it's just need the parent node info. only to populate its sub-nodes ?! FYI we do not do full postback for the page so the tree will not even need the viewstate to render itself.
Link Posted: 20-Apr-2010 22:44
It is callback though.
Callback uses viewstate as well. So FlyTreeView recreates its structure (as well as any other viewstate-enabled control on page) when callback is executed. In case when viewstate disabled, we cannot get and recreate the only parent node (to pass in PopulateNode event), since we do not know its state as well as of any other node.
Link Posted: 24-Apr-2010 02:41
Well, I have discoverd a catastrophic issue but I'm not sure why this happen, I used HttpWatch tool to monitor the size of data the sent and received once the user click on the tree nodes, I have found that the size of data is doubled each time the user click on the same nodes! this behavior does not appear if the tree viewstate is disabled.

My explanation for this is the viewstate is not overwritten each time the user click on the same nodes but instead it's expanded each time!

Please help.
Link Posted: 27-Apr-2010 07:18
ViewState always contains the entire structure of nodes.
So when you add nodes on demand, it send current viewstate to server, then sends back new viewstate (with new nodes). This is how viewstate works in callbacks.
Link Posted: 27-Apr-2010 23:58
It seems that you did not get my point, please try to re-read my last post.
I know how viewstate works, The viewstate is doubled in size not for a new node but for the same node! For example, if I have a two nodes in the tree and clicked on Node1 the viewstate size is 100KB and then clicked on node2 the viewstate size become 150KB (untill now everything is fine) if I click ion the node1 again and size of the viewstate become 300KB! and then clicked on node2 again the size become 600KB!

FYI this behavior does not appear in the Microsoft TreeView control.
Link Posted: 30-Apr-2010 08:56
We are still waiting your reply!
Link Posted: 30-Apr-2010 09:13
Hi again, RĐ°dTreeView had this bug but they fixed it, please read this.


It's exactly the same problem.
Link Posted: 03-May-2010 04:08
Thanks, we're trying to do something with this. But apparently, it'll require some deeper changes rather then fixing some lines.