Hi
I am using WebDataGrid2.0 with VS2008.
WebDataGrid2.0 bind with dataset with more than 1900 hundred rows.
when i am doing filter or paging on WebDataGrid2.0.i am getting below error.
Error:-->"Error during serialization or deserialization using the JSON JavaScriptSerializer.
The length of the string exceeds the value set on the maxJsonLength property."
Note:-->I am getting above error only when WebDataGrid2.0 bind with dataset with more than 1800 rows.
Please help me it's very urgent.
Thanks
Asif
Hi Asif,
When the data grid does an Ajax request, there is a cap to the response that can be sent back. With that many rows in view at time, it is too much to transfer. This is listed in the known issues. There are a couple of options. You could turn on virtual scrolling to only have some of the rows in view at a time. You could also turn EnableAjax off. With the second option, you could wrap the grid with an Update Panel so the whole page does not post back.
regards,
David Young
Hi David,
Thanks for reply.WebDataGrid2.0 inside updatepanel only.if we set
WebDataGrid2.0 property EnableAjaxViewState
="false" then we are not getting above post error.if we set EnableAjaxViewState="false" and if we apply filter on one column and again apply filter on some other column webdatagrid2.0 remove previous filter.
EnableAjaxViewState is a property having to do with the view state. It is not specific to the grid. The column filters are not saved in the view state in that case is what it sounds like. That is why when you add a second filter, the first disappears. You need to set 'EnableAjax' property on the grid.
-Dave
Hi,
Do you have any other questions on this issue?
Valerie
thanks