Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
385
Persists Nodes with ManualSmartCallbacks UltraWebTree
posted

I have a tree that can't refresh the page when loading data. So I went with ManualSmartCallbacks. It works perfectly. However, when I do a postback I can't get any of the information about the nodes. I tried AutomaticSmartCallbacks as well. This article explains that it is impossible to get the nodes on the server side

http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=9685

It says

The limitations of ManualSmartCallbacks may render it unsuitable for use in situations where the full page must be posted back to the server and the full state of all expanded nodes needs to be recreated by the application. In such cases, the preexisting value of Manual should continue to be used. With LoadOnDemand.Manual set and ViewState enabled, the WebTree is able to reconstruct the node structure on a full postback of the page.

If you are using NetAdvantage for .NET 2006 Volume 3 or later, you can still achieve AJAX functionality without incurring the limitations of ManualSmartCallbacks. Place your WebTree inside a WebAsyncRefreshPanel (or "WARP"), and set the LoadOnDemand property to Manual instead. This gives the flexibility of Manual load-on-demand, including the persisting of the tree's node structure, while providing AJAX functionality via the WARP.
 

So, how do I get the Ajax functionality while still being able to get the nodes on postback? The articles says "Place your WebTree inside a WebAsyncRefreshPanel (or "WARP"), and set the LoadOnDemand property to Manual instead." But, this doesn't work at all. It only populates the first nodes, then when expand is pressed, those nodes dissapear. All I did was add the WebAsyncRefreshPanel and set the LoadOnDemand property of the tree to "Manual". So how do I get this to work?

The only alternative I can think of is to collect all the nodes on the client side and then send them across to the server using Ajax (webmethod). This is really nasty and the control should do this work for me.