I have a RadTreeView declared on an .ascx page. All nodes are dynamically added later on a postback. I'm getting the following error:
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
I'm able to get around this in the case where I will always have just one root node by adding a dummy node to the tree view on the initial load of the page, then clearing that node prior to adding the actual root node followed by its children. I'm not able to get around it though in the case where I have multiple root nodes, because the number of root nodes depends on some user selections prior to a postback where the nodes are loaded.
I did just upgrade to the AJAX controls from the classic controls, and I was not having this problem with the classic controls.