Hi,
I'm working on webdatatree with a simple postback onselectionchaged as below
protected void WebDataTree1_OnSelectionChanged(object sender, Infragistics.Web.UI.NavigationControls.DataTreeSelectionEventArgs
e)
{
Label1.Text = e.NewSelectedNodes[0].Value;
//WebDataTree1.Visible = false;
}
it seem to work at first but as i load more nodes (more than 800) into the tree i got this error:
[InvalidOperationException: Operation is not valid due to the current state of the object.] System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeDictionary(Int32 depth) +580240 System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) +155 System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeList(Int32 depth) +141 System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) +231 System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) +80 System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) +44 System.Web.Script.Serialization.JavaScriptSerializer.DeserializeObject(String input) +13 Infragistics.Web.UI.Framework.ObjectBase.LoadCollectionsStateFromViewState() +182 Infragistics.Web.UI.Framework.RunBot.HandleLoadViewState() +60 Infragistics.Web.UI.Framework.Data.HierarchicalDataBoundControlMain.LoadViewState(Object savedState) +422 Infragistics.Web.UI.NavigationControls.NavControl.LoadViewState(Object savedState) +194 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +187 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +148 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +225 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +148 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +225 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +148 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +225 System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +148 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +225 System.Web.UI.Page.LoadAllState() +312 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +747
I tried changing the width and height does not seem to work. the tree load fine but when i click on the node i got the error as above
thank in advance.
Zaid
Hi Zaid,
Thank you for posting in the community.
Your issue may be caused by a recent .Net Framework security upgrade introduced on 12/29/2011. You can find more information on the matter in the following discussion:
http://community.infragistics.com/forums/p/64032/326979.aspx#
The matter may be avoided by chaning the MaxJsonDeserializerMembers to a value larger than the default (1000) in your page's web.config:
<configuration> <appSettings> <add key="aspnet:MaxJsonDeserializerMembers" value="1000" /> </appSettings></configuration>
Please let me know if this helps.
Hi ,
Thanks so much, it works
Thank you for your reply.
Glad that your issue has been resolved. Please feel free to contact me if you have any further questions regarding this matter.