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.
Both ManualSmartCallbacks and Manual require that you handle the DemandLoad event of the tree. In this event, based on the parent node that was just expanded (provided in the e.Node parameter), it's up to the programmer to get the next set of charent nodes and add them to the e.Node.Nodes collection. The KB article you refer to was written under the assumption that the programmer was previously using ManualSmartCallbacks and had already implemented the DemandLoad event.
If you're using ManualSmartCallbacks, then the only information you have about the parent node is e.Node.DataPath - none of the other properties will be populated. If you're using Manual instead, you'll have all the information about all the nodes that have been loaded so far (including the one in the e.Node parameter).
The help article for the DemandLoad event of WebTree (in NetAdvantage for Web Client 2008 Volume 2) gives a sample implementation of the event. Since it's looking at e.Node.Text, this implementation is meant for LoadOnDemand of Manual, and won't work with ManualSmartCallbacks.
Putting WebTree in a WARP along with LoadOnDemand set to Manual means that the DemandLoad event (and any other server events) are processed through the AJAX capabilities of the WARP, rather than via a regular postback.