Hi
We are testing the load-on-demand feature in WebDataTree (v10.3 for asp.net framework 3.5).At first we test this feature on a simple Web-form application example (created with VS2010 - Framework 3.5) and it works well.
But, when we added the same changes to our real application ( Note . It was converted from VS2003 to VS2010) we have this problem:
When the webDatatree is loaded , the first level is bound to the tree , but we have a javascript alert “Deserialization failure: Invalid response” each time we try to expand a node in the first level (I mean: try to bind on demand the other levels) and the message that we have defined "Loading ... Please wait! "with DataLoadingMessage attribute remains frozen.Anyone have an idea of the source of this problem ?
Thanks
Here is the definition of our WebDataTree:
<body style="margin: 0px;" oncontextmenu="return false" onresize="setTimeout('SaveCurrentFrameSizes()',100);"> <form id="Form1" runat="server"> <ig:WebScriptManager ID="WebScriptManager1" runat="server"> </ig:WebScriptManager> <table id="Table1" cellspacing="0" cellpadding="0" width="100%" border="0"> <tr> <td id="td" align="right" width="100%" style="height: 18px; background-image: url(APP_THEMES/<%=Page.Theme%>/IMAGES/searchbg.JPG);"> <input type="image" id="Pin" onclick="CollapseShowPane('<%=Page.Theme%>');" src="APP_THEMES/<%=Page.Theme%>/Images/ig_menuBlueLeft.GIF" style="vertical-align: middle;" /> </td> </tr> </table> <table id="Table2" cellspacing="0" cellpadding="0" width="100%"> <tr> <td valign="top" id="treetd"> <ig:WebDataTree ID="WebTree" runat="server" Width="100%" Height="100%" DataSourceID="XmlDataSourceForTree" InitialExpandDepth="1" InitialDataBindDepth="1" DataLoadingMessage="Loading...Please wait!" onnodeclick="WebTree_NodeClick"> <AutoPostBackFlags NodeClick="On" /> <DataBindings> <ig:DataTreeNodeBinding DataMember="Folder" KeyField="id" TextField="name" ValueField="FolderTypeId" /> </DataBindings> </ig:WebDataTree> <asp:XmlDataSource ID="XmlDataSourceForTree" runat="server"></asp:XmlDataSource> </td> </tr> <tr><td> <asp:HiddenField id="lastSize" runat="server" /> </td></tr> </table> </form></body>
Hi,
this is happening because you are looding too much data into the tree control. We have an optimization for the post back, that caches some data on the server. You will not see this error if you set this.WebDataTree1.OptimizeCollectionsState = false in page load. But this will decrease the postback speed in IE specifically. Also if you are using load on demand I think turning off this optimization will not hurt your performance. Give it a try and let me know.
1/ We found the source of the problem:
Because we don’t use before the load-on-demand mode in our application, the filling of the xml data file and the binding between the WebDattree and XmlDataSource was done dynamically the first time the page was loaded and accessed (Page_load handler in side a not postback condition). In addition we remove the xml data file after the binding causing the problem with the load-on-demand mode.
So the problem is fixed.
2/ But I have another problem with serialization/deserialization:
Our goal is to use WebDataTree with load-on-demand mode to store a tree of over 200000 entries
But with just a tree with 36000 entries we have a problem : (Javascript Alert “Server does not respond”) when we try to expand a level which has 2000 entries(each entry has ~40 char ) with load-on-demand mode .
Note: No problem with expanding levels with just (~1000 entries).
Here is the detail of exception that we have:
System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat)
at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output)
at Infragistics.Web.UI.Framework.CallbackObject.GetResponse(String viewState, String eventValidation, Object[] additionalScripts)
at Infragistics.Web.UI.Framework.RunBot.RenderPageCallBack(HtmlTextWriter writer, Control control)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I try to increase the value of maxJsonLength in the web.config but it does not resolve the Problem.
Thanks For your help
Best Regards.
Hi kuroczyd,
I know this is an old post, but did the newer version of Infragistics fix this issue? We are having very similar problems loading about 3000 nodes in the WebDataTree.
Thanks.
Hello kuroczyd,
Could you please apply the lastest service release and this problem should go away.
Thank you for using the Infragistics forums!