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?
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.
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.
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.
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.
Yes, and I use not iframes but framset and frames.
A possible solution would be to cancel the client-side NodeClick event if it is raised by right mouse button (which I assume you are using to show your context menu). So if a user right clicks a node, the menu should be displayed and the postback cancelled:
function WebDataTree1_NodeClick(sender, eventArgs) { if (eventArgs.get_browserEvent().button == 2) { eventArgs.set_cancel(true); }}
Let me know if this helps.
Hello Nikolay,
Thanks a lot, it works like magic - you made my day!
And this set_cancel sounds to be useful for my other issues... Once I asked if it's possible to handle group_click for webexplorerbar client side and item_click server side. Just I'd like to know, is there any client side analog of IsExplorerBarItem, IsExplorerBarGroup?
Thanks, that's a pity. However in version 11.1.20111.1006 animation kind of worked as we discussed earlier... However I guess it's because the postback wasn't firing until the mouse button was released.
It seems that this is not possible.
Thanks, now it works with AutoPostBack off OK, and plus the problem with addEventListener() javaScript Error in IE9 (http://es.infragistics.com/community/forums/p/73735/373027.aspx#373027) is gone, too. However, the same behaviour I reproduced in the same sample by switching AutoPostBack flag for clicking to Async. And with On there is of course no animation, but I assume it's a right behaviour. By the way, is there any way to have simultaneously this really nice animation and AutoPostBack on? It seems no, because AutoPostBack causes, as it should, post back.
You can find the latest SR in our website by going to Account – Keys & Downloads and selecting your product name. Then go to Service Releases tab – there you will find the download link.
Thanks for the piece of advice and reproducing the issue. However, then I tried to modify the installation and left Install with lastest service release checked it kept saying Unable to download updates - but the internet connection is OK, the installation pocess has been run under administrator, I allowed it through firewall, the process isn't block by any antivirus etc. Then I downloaded and installed archived release from here https://es.infragistics.com/support/archived-downloads Download NetAdvantage for ASP.NET 2011 Volume 1 , but it contained the same version 11.1.20111.1006. Where can I get 11.1.20111.2178 version?