We have a very large grid that is populated with data just fine. When we try to filter, we get the following message:
Exception type: InvalidOperationException Exception message: 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 have added the following to the config file to increase the maxJsonLength and made it the maximum allowed (value is an integer) <system.web.extensions> <scripting> <webServices> <jsonSerialization maxJsonLength="2147483647"/> </webServices> </scripting> </system.web.extensions>
But I'm still getting the error. I'm using 11.1.2064 grid. Paging is not an option in this case. So it seems that the grid performs the filtering on the client and generates Json data to work with.
Alex
Hello Alex,
I am just following up to see if you have any further questions with this matter.
Let me know if I may be of a further assistance.
When Paging is enabled WebDataGrid renders records based on page size. In order to look in to this let me know the page size and provide me markup of the WebDataGrid. You may also refer to the below link that will give you some tricks to improve performance:
<http://help.infragistics.com/NetAdvantage/ASPNET/2011.2/CLR4.0/?page=WebDataGrid_Tips_And_Tricks.html>
I hope this helps.
Thanks Bhadresh, but that did not work. I removed the ScriptManager, set EnableAjax="False", the timeouts are large and the error still comes up 2 seconds after a filter or order.
WebDataGrid uses Ajax Framework to fitter data as well as Paging and other behaviors. The maximum length of data that can be sent depends on browser, web server as well as limitation of Ajax Frame work on POST request. Grid does partial post back (Ajax post back) to show the results in grid based on filter criteria.
In order to work around this limitation you may set EnableAjax property of the WebDataGrid to "False" or you can set time out period of the grid. Review the link below that will give more details on this:
<http://forums.infragistics.com/forums/p/25369/92964.aspx>
Actually, I even enabled paging, and the error still came up when I tried to page. I understand there is a lot of data (the rendered file is 10MB), but what good is displaying so much data when you can't do anything with it?
Thanks