Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > TreeView > fastest way to add nodes on the client side

Not answered fastest way to add nodes on the client side

Feed from this thread
  • mirang Intermediate avatar

    Posted on Jan 29, 2012 (permalink)

    Which is the fastest and optimized way to add tree nodes on the client side. I am following this approach : 
    var treeNodeCollection = currentNode.get_nodes();
    var node = new Telerik.Web.UI.RadTreeNode();
    node.set_text("Text1");
    node.set_value("Value1");
    treeNodeCollection.add(node);

    The reason I am asking because i have nodes in thousands to add to through client, so was looking for the most optimized and fastest way to do it.

    Reply

  • mirang Intermediate avatar

    Posted on Jan 30, 2012 (permalink)

    Actually I am creating nodes using the "LoadMore..." functionality and as an when i go on adding nodes using the above code the loading time looks to be exponentially increasing... I am loading like 200 records at one time. Looks like the get_allnodes() method after some nodes is taking more time. Please suggest...

    Reply

  • mirang Intermediate avatar

    Posted on Jan 31, 2012 (permalink)

    The reason why i asked this question is because by using LoadMore... functionality to add nodes, internet explorer is becomming exponentially slow if the number of nodes added start becomming more than 3000. I am using the procedure explained in the following link to add nodes from javascript : 

    http://www.telerik.com/community/code-library/aspnet-ajax/treeview/radtreeview-s-addnodesto-method-as-best-performing-solution-for-creating-new-or-moving-existing-nodes-on-the-client-side.aspx 

    var treeNodeCollection = new Array();
    for (var nodeIndex = 0; nodeIndex < nodeLength; archiveIndex++) {
                    var node = new Telerik.Web.UI.RadTreeNode();
                    var data = MainDataArray[nodeIndex];
                    node.set_text(data.Text);
                    node.set_value(data.Value);
                    var imageUrl = data.ImageUrl.replace('~\\', '');
                    node.set_imageUrl(imageUrl);
                    //add a dummy node to this node
                    node.get_nodes().add(DummyNode());
                    treeNodeCollection[nodeIndex] = node;
                    nodeIndex++;
                }

    treeView.addNodesTo(currentNode, treeNodeCollection);

    The code works fine with chrome, but with IE it goes on becomming slower and slower.
    Do we have any known issue or limitation, because our main aim is to load around 50000 nodes under one node.

    Reply

  • Plamen Zdravkov Plamen Zdravkov admin's avatar

    Posted on Feb 1, 2012 (permalink)

    Hello Mirang,

     
    This limitation is an expected IE behavior because the script machine of IE is much slower when a large amount of  javascript and HTML is generated.
      

    Kind regards,
    Plamen Zdravkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

    Reply

  • mirang Intermediate avatar

    Posted on Feb 1, 2012 (permalink)

    Thanks for your reply.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > TreeView > fastest way to add nodes on the client side
Related resources for "fastest way to add nodes on the client side"

ASP.NET TreeView Features  |   Documentation   |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]