﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebTreeView - LoadOnDemand more node levels</title><link>http://www.intersoftsolutions.com/Community/WebTreeView/LoadOnDemand-more-node-levels/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>LoadOnDemand more node levels</title><link>http://www.intersoftsolutions.com/Community/WebTreeView/LoadOnDemand-more-node-levels/</link><pubDate>Sun, 03 Aug 2014 22:57:11 GMT</pubDate><dc:creator>Hans</dc:creator><description>Hello,&lt;br&gt;&lt;br&gt;Thank you for the reply.&lt;br&gt;&lt;br&gt;Should you have further question, please do not hesitate to contact us.&lt;br&gt;&lt;br&gt;Thank you.&lt;br&gt;&lt;br&gt;Regards,&lt;br&gt;Hans K.</description></item><item><title>LoadOnDemand more node levels</title><link>http://www.intersoftsolutions.com/Community/WebTreeView/LoadOnDemand-more-node-levels/</link><pubDate>Mon, 28 Jul 2014 05:00:04 GMT</pubDate><dc:creator>kveta.nemcova@cdt.cz</dc:creator><description>Hi,OK, I just wanted to be sure that I missed something
</description></item><item><title>LoadOnDemand more node levels</title><link>http://www.intersoftsolutions.com/Community/WebTreeView/LoadOnDemand-more-node-levels/</link><pubDate>Mon, 21 Jul 2014 23:16:57 GMT</pubDate><dc:creator>Hans</dc:creator><description>&lt;p&gt;Hello,&lt;br&gt;&lt;br&gt;Thank you for the reply.&lt;br&gt;&lt;br&gt;Basically, in “Load on Demand” case, that is behavior in WebTreeView, you should load/render the parent node before you can load the child node.&lt;br&gt;&lt;br&gt;Regarding “the better workaround”, I still can’t get the better workaround than yours.&lt;br&gt;&lt;br&gt;Regarding “hide plus button”, perhaps you could hide the “plus” / expand button in “OnInitializeNode” server side event.&lt;br&gt;&lt;br&gt;Here’s the example snippet code how to hide the expand button:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;protected void WebTreeView1_InitializeNode(object sender, WebTreeViewNodeEventArgs e){
    // For example, this code will hide the node the have depth level equal to 3
    if (e.Node.Depth == 3)
        e.Node.ChildNodeExpandable = false;
}&lt;/pre&gt;&lt;p&gt;Thank you.&lt;br&gt;&lt;br&gt;Regards,&lt;br&gt;Hans K.&lt;br&gt;&lt;/p&gt;</description></item><item><title>LoadOnDemand more node levels</title><link>http://www.intersoftsolutions.com/Community/WebTreeView/LoadOnDemand-more-node-levels/</link><pubDate>Mon, 21 Jul 2014 07:54:17 GMT</pubDate><dc:creator>kveta.nemcova@cdt.cz</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;thanks for your time,&amp;nbsp;&lt;span style="font-size: 10pt;"&gt;you are right, in our scenario I can keep PopulateOnDemand = false for this nodes and I combine our two scenarios... But I can still do in ASP:TreeView this (basicaly ExpandToNode / ExpandToNodes functionality&lt;/span&gt;&lt;span style="font-size: 10pt;"&gt;)&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e)    {
        TreeNode n = new TreeNode();
        n.PopulateOnDemand = true;
        e.Node.ChildNodes.Add(n);
        if (...) // condition for nodes i want expand
            n.Expand(); // it calls resursively by treeview
    }&lt;/pre&gt;&lt;p&gt;and it expand tree on &lt;b&gt;server &lt;/b&gt;and send all nodes to client in 1 request (ExpandToNodes functionality). This doesnt work with WebTreeView.&amp;nbsp;&lt;span style="font-size: 10pt;"&gt;I can call n.Expand() on&amp;nbsp;WebTreeView1_InitializeChildNodes but nothing happend - i know its not asp:TreeView, just asking if there is better way than "clicking" with javascript on nodes and generate many requests.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Another thing i notice is if I expand node (populateOnDemand) and it has no child the "plus" button didnt hide and also clientside event&amp;nbsp;OnNodeExpand is not called (but this is maybe OK, nothing expanded)&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>LoadOnDemand more node levels</title><link>http://www.intersoftsolutions.com/Community/WebTreeView/LoadOnDemand-more-node-levels/</link><pubDate>Mon, 21 Jul 2014 03:49:50 GMT</pubDate><dc:creator>Hans</dc:creator><description>&lt;p&gt;Hello,&lt;br&gt;&lt;br&gt;I apologize for the late response.&lt;br&gt;&lt;br&gt;Basically, we can’t use “Load on Demand” scenario or feature in (TreeView) node that already has children (child node).&lt;br&gt;&lt;br&gt;I attached a page that contains ASP.Net TreeView to show how the “Load on Demand” feature of ASP.Net TreeView works.&lt;br&gt;&lt;br&gt;In this page, I add “OnTreeNodePopulate” server side event to the TreeView control.&lt;br&gt;&lt;br&gt;On the “Page_Load” server side event, I create the root node for the TreeView:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;protected void Page_Load(object sender, EventArgs e){
    if (!IsPostBack)
    {
        TreeNode rootNode = new TreeNode();
        rootNode.Text = "Root";
        rootNode.Value = "Level0";
        rootNode.Expanded = true;
        rootNode.PopulateOnDemand = true;

        TreeView1.Nodes.Add(rootNode);
    }
}&lt;/pre&gt;&lt;p&gt;Then in “OnTreeNodePopulate” server side event I try to add two nodes with different depth level.&lt;br&gt;&lt;/p&gt;&lt;pre&gt;protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
    TreeNode newNode = new TreeNode();
    newNode.Text = "Level One";
    newNode.Value = "Level1";
    newNode.PopulateOnDemand = false;

    TreeNode newNode2 = new TreeNode();
    newNode2.Text = "Level Two";
    newNode2.Value = "Level2";
    newNode2.PopulateOnDemand = true;

    newNode.ChildNodes.Add(newNode2);
    e.Node.ChildNodes.Add(newNode);
}&lt;/pre&gt;&lt;p&gt;With this configuration the ASP.Net TreeView will work properly. However, if you try to modify the “PopulateOnDemand” property, in “newNode”, to “True”.&lt;br&gt;You will get the warning message while you are trying to expand the root node.&lt;br&gt;&lt;br&gt;I attached the video regarding the result on my end as well.&lt;br&gt;&lt;br&gt;As you can see, the Intersoft WebTreeView have the same default behavior with ASP.Net TreeView, that the “Load on Demand” scenario or feature can’t be applied in (TreeView) node that already has children (child node).&lt;br&gt;&lt;br&gt;Due to that behavior, in this Load on Demand scenario, the WebTreeView will only load the parent node, not with its child node.&lt;br&gt;&lt;br&gt;Hope this helps.&lt;br&gt;&lt;br&gt;Regards,&lt;br&gt;Hans K.&lt;br&gt;&lt;/p&gt;</description></item><item><title>LoadOnDemand more node levels</title><link>http://www.intersoftsolutions.com/Community/WebTreeView/LoadOnDemand-more-node-levels/</link><pubDate>Wed, 16 Jul 2014 09:23:26 GMT</pubDate><dc:creator>kveta.nemcova@cdt.cz</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I have WebTreeView with LoadOnDemand enabled. Is it posibble to load several nodes from server on node expand (not on same level)? In codebehind something like this&lt;/p&gt;&lt;pre&gt;protected void WebTreeView1_InitializeChildNodes(object sender, ISNet.WebUI.WebTreeView.WebTreeViewNodeEventArgs e)
    {
        WebTreeViewNode node1 = new WebTreeViewNode("level 1");
        WebTreeViewNode node2 = new WebTreeViewNode("level 2");

        node1.Nodes.Add(node2);
        e.Node.Nodes.Add(node1);
    }&lt;/pre&gt;&lt;p&gt;This load only node1.&lt;/p&gt;&lt;p&gt;In our application we have button, which expand tree to show certain nodes (by type). Nodes can be on any level. We use classic ASP TreeView where this is no problem - loadondemand, but on server i can prepare nodes and it worked.&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;With WebTreeView i must use "workaround" - on server (button click event) prepare all nodes and their path, save this for javascript and when page loads expand first node. Then WebTreeView have clientside event OnNodeExpand where i take next path to expand, find the node a and call Expand() on it. And so on, until all nodes are expanded. But it can take a long time, because its client - server comnunication for every node. Basicaly emulate user clicking.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 10pt;"&gt;Is this the only way to achive this?&amp;nbsp;&lt;/span&gt;&lt;br style="color: red; font-family: 'Courier New', Tahoma; font-size: 9pt; background-color: rgb(255, 252, 225);"&gt;&lt;/p&gt;</description></item></channel></rss>