Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
935
IE Script error when selecting node with 3000 child nodes
posted

Hi All,

I have a WebDataTree that displays Active and Inactive company names with contact details as child nodes. There are three levels as below:

Active

Company Name

Contact One

Contact Two

Company name and contact details are manually added to the tree in code behind using:

//Add company name to the tree

webDataTree.Nodes(EntityStatus.Active).Nodes.Add(item.CompanyName, item.CompanyId)

// Add contact details to the company node

webDataTree.Nodes(status).Nodes.FindNodeByKey(currentCompanyId).Nodes.Add(contactNode)

This was working fine until recently when we came across a company with more than 3000 contacts. Now, the method that loads the tree runs fine, but the tree still takes a long time to load. When selecting any contact node from the tree to display details of the contact, it brings up an IE error that the script is taking too long to run.

The Infragistics version number is 10.1.20101.1011.

I would appreciate your assistance with this query.

Thanks.

 

Parents Reply
  • Hi Tsvetelina,

    I have updated the web.config file maxJsonLength  to the maximum integer value based on your reply and here are my findings

    1.       Manual Load On Demand -

    ·          Initial load of the tree is much quicker

    ·          Expanding a company name with > 3000 contacts - Run-time error as below:

    Even with the "Manual Load on Demand" code, once a company with thouands of contacts is expanded, selecting a company name to view details, still generates a "IE script error" right before the selected node in the tree is highlighted.

    The IE script error pops up and then redirects to our generic error page due to an unhandled exception. The exception that gets logged is as below:

    An exception of type 'System.InvalidOperationException' occurred and was caught.

    Type : System.InvalidOperationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Operation is not valid due to the current state of the object. Source : System.Web.Extensions Help link : Data : System.Collections.ListDictionaryInternal TargetSite : System.Collections.Generic.IDictionary`2[System.String,System.Object] DeserializeDictionary(Int32) Stack Trace : at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeList(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeList(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeList(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) at System.Web.Script.Serialization.JavaScriptSerializer.DeserializeObject(String input) at Infragistics.Web.UI.Framework.RunBot.HandleOnInit(HttpContext context) at Infragistics.Web.UI.Framework.Data.HierarchicalDataBoundControlMain.OnInit(EventArgs e) at Infragistics.Web.UI.NavigationControls.NavControl.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    2.       AddRange - Same results as above

    I would appreciate your assistance with this. Is there a known limitation on the number of nodes that can be added to the WebDataTree control?

    Thanks.

Children