'stop running the script' in IE

2 posts, 0 answers
  1. Gijo
    Gijo avatar
    26 posts
    Member since:
    Jan 2008

    Posted 16 Apr 2012 Link to this post



    Hi Team,

    I have the below treeview and uses 'Load On Demand' and for certian nodes it has around 5000 child nodes and are throwing the javascript error 'stop running the script'. Below are what I tried.

    1. In the NodeExpand event, I changed the expand mode to 'ServerSide', it worked fine. But I need AJAX.
    2. I tried setting ScriptMode="Release" but didn't work.
    3. I tried PersistLoadOnDemandNodes='false' and it worked. But I want to use server side events.

    Gijo Joseph.


    <telerik:RadTreeView ID="RadTreeView" runat="server" EnableDragAndDrop="true" 





    protected void RadTreeView_NodeExpand(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
      List<Node> ltChilNodes = GetListofChildNodes();
      foreach (Node node in ltChilNodes)
        RadTreeNode onDemandNode = new RadTreeNode(node.Name);
        onDemandNode.Attributes.Add("Attr1", node.Attr1);
        onDemandNode.Attributes.Add("Attr2", node.Attr2);
        onDemandNode.Attributes.Add("Attr3", node.Attr3);
        onDemandNode.Attributes.Add("Attr4", node.Attr4);
        onDemandNode.Attributes.Add("Attr5", node.Attr5);
        onDemandNode.ExpandMode = TreeNodeExpandMode.ServerSideCallBack;

  2. Bozhidar
    Bozhidar avatar
    1096 posts

    Posted 19 Apr 2012 Link to this post

    Hello Gijo,

    This is a common issue and unfortunately we have no control over it. 

    There are a couple of things you can do to get rid of the problem:
    1. Use WebService LoadOnDemand, which is the fastest available LoadOnDemand mode. You can take a look at the following demo for reference:
    2. Instead of loading all the child nodes at once, you can load only a portion of them at a time. I've attached a sample project demonstrating the approach.
    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top