I have using WebTree with Manual LoadOnDemand feature. I am facing an issue on click on child nodes being added in DemandLoad event. TreeView is getting refreshed and restoring the original state (not maintaing the current state). Even the NodeClicked event is not getting triggered for these nodes.
I am not sure what am i missing.
I suspect you're doing something to clear the existing nodes of the tree and recreate them. Ensure that your tree's EnableViewState property is set to true, and that you're not databinding it on postbacks (such as in the Page_Load event handler).
Thanks a lot Vince for your response.
I am not clearing existing nodes. Initially on load, i am displaying two levels in the treeview. I am adding child-nodes in DemandLoad method for requesting node. Everything is fine on selecting 1st level nodes,. But 2nd level (which was added in DemandLoad) selection, causes the treeview refresh and again only two levels are being displayed as was on load.
This is how i'hv defined my datagrid control. ...
<ignav:ultrawebtree runat="server" ID="TreeView1" FullNodeSelect="True" Indentation="10" InitialExpandDepth="3" ExpandOnClick="True" Width="100%" LoadOnDemand="ManualSmartCallbacks" SingleBranchExpand="true" ondemandload="TreeView1_DemandLoad" EnableViewState="true" onnodeselectionchanged="TreeView1_NodeSelectionChanged" > ...
protected void TreeView1_DemandLoad(object sender, Infragistics.WebUI.UltraWebNavigator.WebTreeNodeEventArgs e)
{ // Adding nodes in e.Node using result of Database call..
e.Node.Nodes.Add("ChildNode"); }