Hi,
My end goal is create a Telerik.Web.Spreadsheet.Workbook that is loaded from the database server side and load it in the Kendo spreadsheet control on the client side. This was working fine until I got to a certain size file.
To simplify I've attached a sample of the JSON of the worksheet that I'm having a problem loading and below is the code. I've checked a couple of sources to verify that the JSON validates. I'm not sure what else could be the problem. If you remove the last few rows (to truncate back to index 198) it loads fine.
Server side code:
public ActionResult ReadSheet(string id) {
string jsonWorksheet = string.Empty;
using (TextReader reader = System.IO.File.OpenText(@"C:\DemoRowTo204Broken.json")) {
jsonWorksheet = reader.ReadToEnd();
}
return Content(jsonWorksheet, Telerik.Web.Spreadsheet.MimeTypes.JSON);
}
client side code in an .cshtml file:
@(Html.Kendo().Spreadsheet() .Name("eSheet") .Toolbar(false) )<script> $(document).ready(function () { var spreadsheet = $("#eSheet").data("kendoSpreadsheet"); $.getJSON("@Url.Action("ReadSheet", "ProductGrid")", { id: $("#ProductID").val() }, function (data) { spreadsheet.fromJSON(data); }) }); </script>
Your advise is appreciated. Mark