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?
In fact, it happens of course on "On" AutoPostBack for Node_Click. But the problem is that I have to use user contextmenu, made from webdatamenu. And I was able to reproduce it in a sample, it's really simple, so I won't put it here - the point is that menu blinks and disappears (menu is bound by javascript). I understand why this is happening - js code makes menu appear and then AutoPostBackFlag on for click makes everything redraw. Is there any workaround? I tried to place server code to SelectionChanged, switching postback to this event, leaving the clientside event bound to click, but it won't help (client node click fires before selection changed, too).
Hi Andrey,
You can scroll to selected node, for example using the Initialize client-side event:
function InitTree(sender, args) {
var selectedNode = sender.get_selectedNodes()[0];
if (selectedNode != null) {
var tree = sender.get_element();
sender._scrollToNode(selectedNode, tree);
}
And as you noted above, it would be better not to use iframes. However if you choose to work with it, I would need a sample code to see how exactly you are trying to change the content of the second frame.
And one more point... I use webdatatree in a separate frame as naviagation and on clicking I change the content of the other frame. If I use AutoPostBack flag for node_click as on or off, sometimes (randomly, some times it blinks, sometimes it doesn't on node_click, I couldn't find any logic in this happening). Of course on using Asynchronous the content of the other frame does not change. Any help? I think I'd better migrate to MasterPages and different principles and then it will disappear (I'm going to check it soon), but it's a lot of work since the project is huge.
Hello,
Thanls a lot, Patric, it works. There is one more issue already discussed in several threads, but nothing seems helpful - scrolling into view. As far as I know there is now only client-side scrolling into view for WebDataTree. And returning from the other page I restore my tree from backup tree like this:
this.wdtTargets.Nodes.Clear();
foreach (DataTreeNode n in t.Nodes)
this.wdtTargets.Nodes.Add(n);
wdtTargets and t, as you've understood, WebDataTree's.
And upon this, I need to scroll SelectedNode into view. Is that possible?
Hello Andrey,
i could catch the init of some controls in the Page_Init event. It fires before Page_Load and is the place for the special bindings. Look at http://support.microsoft.com/kb/305141
Patric