Hi,
1) In UltraWebTree DemandLoad fired after Page_Load on clicking "populating symbol" of the node. However, for WebDataTree NodePopulate fires before Page_Load (I was surpised, but I used breakpoints several times to be sure), and that's inconvenient, because the order is crucial for me. Any help?
2)In Nodes of UltraWebTree AddRange method took Collection as an Argument, so it was possible to add all the nodes of the one tree to the other one correctly. Is there any way to do that for webDataTree?
Will
foreach (DataTreeNode n in firstTree.Nodes)
secondTree.Nodes.Add(n);
give the same effect?
Thanks a lot, I solved the adding issue. However, as for loading - I read these two examples before, but I use not standard binding, but some kind of user SessionManager. So I need some code in Page_Load executed BEFORE node_populate handler. Now I have to call page_load from node_populate, but because of it page_load is called twice (of course i use some kind of check for most code in page_load not to run second time, but still it's a workaround and a bad one). Is there any better way?
Here is an example of using the AddRange method:
DataTreeNode[] dtnc = new DataTreeNode[WebDataTree1.Nodes.Count]; foreach (DataTreeNode n in WebDataTree1.Nodes) { dtnc[n.Index] = n; } WebDataTree2.Nodes.AddRange(dtnc);
Hope this helps.
Hi Andrey,
If you want to use load on demand feature of WebDataTree I would suggest you to check the online samples - https://es.infragistics.com/samples/aspnet/data-tree/manual-load-on-demand, https://es.infragistics.com/samples/aspnet/data-tree/load-on-demand and the documentation - http://help.infragistics.com/Help/Doc/ASPNET/2012.1/CLR4.0/html/WebDataTree_Load_on_demand.html.
And yes, the suggested by you code should work to add nodes to another tree. However, the WebDataTree also have the AddRange method to add an array of nodes.
Please do not hesitate to ask if you have any questions.