I am using Infragistics v16.1 and have encountered an issue where i have a web data grid with 25 columns and 1000 blank rows. After copy/paste 1000 records from excel and click submit button getting below error: "Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.".
I already set EnableAjax="false" and EnableAjaxViewState="false" and added _callbackManager.setTimeout(600000) in web data grid initialize function.
I already went through some of the posts regarding the same , but not able to find any solutions.
How to fix this issue.should I be able to find this in any documentation?
cheers
Rajesh
Hello Rajesh,
Thank you for the sample and detailed information on how to reproduce the issue.
Better approach when handling this amount of data is to proceed the upload of the file on the server, and not copy/paste it. I have created a sample in order to show you what I mean. I hope you will find the sample helpful.
Let me know if I could be of further assistance.
Hi Zdravko Kolev,
I forgot to add the below line in previously attached solution.But I have this line in my application for increase the timeout to 10 min and the logic is inside WebDataGridView_Initialize method.
<ClientEvents KeyUp="keyUp" Initialize="WebDataGridView_Initialize" />
Please add this line in previously attached solution to replicate the issue.
Cheers,
The issue is not on copy/paste. The copy paste is working fine. the exception happening on button click.
I am using Infragistics v16.1. Please find the attached solution with an excel file with data for 1000 rows.
Please run the application and copy/paste 1000 rows in the grid. The exception will be thrown after button click. (i.e. Maximum request length exceeded).
As per client, they wants minimum 1000 rows for bulk submit.
All the works are done except this exception, please help on this.
Hello Rejesh,
Thank you for your question.
Keep in mind that on paste operation, copied columns from the excel file, should match the selected WebDataGrid cells (have a look at the attached image below).
Also the data should match, if you have date value in one od the cells and you pass some string, the serialization will fail.
You can try to modify the attached sample in order to reproduce the issue and I will be able to help you further with it.
Image:
i have tried below steps also but no luck: